Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
+15
-4
@@ -8,17 +8,28 @@ export type DateFieldProps = {
|
||||
label: string;
|
||||
name: string;
|
||||
defaultValue?: string;
|
||||
value?: string;
|
||||
onChange?: (value: string) => void;
|
||||
required?: boolean;
|
||||
/** Width override; the field fills its column by default. */
|
||||
className?: string;
|
||||
};
|
||||
|
||||
export function DateField({ label, name, defaultValue }: DateFieldProps) {
|
||||
export function DateField({ label, name, defaultValue, value, onChange, required, className }: DateFieldProps) {
|
||||
return (
|
||||
<label className="flex flex-col gap-1">
|
||||
<span className="text-body-small-medium-0 font-body-small-medium-0 text-text-neutral-tertiary">{label}</span>
|
||||
<label className={`flex w-full flex-col gap-1 ${className ?? ""}`}>
|
||||
<span className="text-body-small-medium-0 font-body-small-medium-0 text-text-neutral-tertiary">
|
||||
{label}
|
||||
{required ? " *" : ""}
|
||||
</span>
|
||||
<input
|
||||
type="date"
|
||||
name={name}
|
||||
defaultValue={defaultValue}
|
||||
className="h-9 rounded-[4px] border border-solid border-border-default bg-transparent px-3 text-body-default-regular-0 font-body-default-regular-0 text-text-neutral-primary outline-none"
|
||||
value={value}
|
||||
onChange={onChange ? (event) => onChange(event.target.value) : undefined}
|
||||
required={required}
|
||||
className="h-9 w-full rounded-[4px] border border-solid border-border-default bg-transparent px-3 text-body-default-regular-0 font-body-default-regular-0 text-text-neutral-primary outline-none"
|
||||
/>
|
||||
</label>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user