Actualizar frontend/src/components/UI.jsx
This commit is contained in:
@@ -35,11 +35,11 @@ export function Filters({ children }) {
|
||||
return <div className="filters">{children}</div>;
|
||||
}
|
||||
|
||||
export function Select({ label, value, options, onChange }) {
|
||||
export function Select({ label, value, options, onChange, width }) {
|
||||
return (
|
||||
<div className="filter-group">
|
||||
<div className="filter-group" style={width ? { width } : undefined}>
|
||||
{label && <label>{label}</label>}
|
||||
<select value={value} onChange={(e) => onChange(e.target.value)}>
|
||||
<select value={value} onChange={(e) => onChange(e.target.value)} style={width ? { width: "100%" } : undefined}>
|
||||
{options.map((o) => {
|
||||
const val = typeof o === "object" ? o.value : o;
|
||||
const txt = typeof o === "object" ? o.label : o;
|
||||
|
||||
Reference in New Issue
Block a user