forked from ddrilling/asb_cloud_front
PeriodPicker добавлена возможность указывать доп атриббуты
This commit is contained in:
parent
e7fed714ee
commit
cf7323ba5a
@ -16,10 +16,12 @@ const timePeriodCollection = [
|
|||||||
type PeriodPickerProps = {
|
type PeriodPickerProps = {
|
||||||
defaultValue?: number
|
defaultValue?: number
|
||||||
onChange?: (value: number) => void
|
onChange?: (value: number) => void
|
||||||
|
[other: string]: any
|
||||||
}
|
}
|
||||||
|
|
||||||
export const PeriodPicker = ({ defaultValue = defaultPeriod, onChange }: PeriodPickerProps) => (
|
export const PeriodPicker = ({ defaultValue = defaultPeriod, onChange, ...other }: PeriodPickerProps) => (
|
||||||
<Select
|
<Select
|
||||||
|
{...other}
|
||||||
defaultValue={defaultValue}
|
defaultValue={defaultValue}
|
||||||
onChange={(value) => onChange?.(Number(value))}
|
onChange={(value) => onChange?.(Number(value))}
|
||||||
options={timePeriodCollection}
|
options={timePeriodCollection}
|
||||||
|
Loading…
Reference in New Issue
Block a user