Update table field components
The structure of TableField's image props have changed
This commit is contained in:
parent
f9ba98ca82
commit
9a16574948
3 changed files with 18 additions and 20 deletions
|
|
@ -11,9 +11,11 @@ interface Props {
|
||||||
description?: string
|
description?: string
|
||||||
value?: number
|
value?: number
|
||||||
className?: string
|
className?: string
|
||||||
imageAlt?: string
|
image?: {
|
||||||
imageClass?: string
|
className?: String
|
||||||
imageSrc?: string[]
|
alt?: string
|
||||||
|
src: string[]
|
||||||
|
}
|
||||||
min: number
|
min: number
|
||||||
max: number
|
max: number
|
||||||
step: number
|
step: number
|
||||||
|
|
@ -47,10 +49,8 @@ const SliderTableField = (props: Props) => {
|
||||||
return (
|
return (
|
||||||
<TableField
|
<TableField
|
||||||
name={props.name}
|
name={props.name}
|
||||||
className="SliderField"
|
className="slider"
|
||||||
imageAlt={props.imageAlt}
|
image={props.image}
|
||||||
imageClass={props.imageClass}
|
|
||||||
imageSrc={props.imageSrc}
|
|
||||||
label={props.label}
|
label={props.label}
|
||||||
>
|
>
|
||||||
<Slider
|
<Slider
|
||||||
|
|
@ -63,13 +63,15 @@ const SliderTableField = (props: Props) => {
|
||||||
onValueCommit={handleValueCommit}
|
onValueCommit={handleValueCommit}
|
||||||
/>
|
/>
|
||||||
<Input
|
<Input
|
||||||
className="Bound"
|
className="number"
|
||||||
|
bound={true}
|
||||||
type="number"
|
type="number"
|
||||||
value={`${value}`}
|
value={`${value}`}
|
||||||
min={props.min}
|
min={props.min}
|
||||||
max={props.max}
|
max={props.max}
|
||||||
step={props.step}
|
step={props.step}
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
|
hide1Password={false}
|
||||||
/>
|
/>
|
||||||
</TableField>
|
</TableField>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,11 @@ interface Props extends React.HTMLAttributes<HTMLDivElement> {
|
||||||
value?: boolean
|
value?: boolean
|
||||||
className?: string
|
className?: string
|
||||||
tabIndex?: number
|
tabIndex?: number
|
||||||
imageAlt?: string
|
image?: {
|
||||||
imageClass?: string
|
className?: String
|
||||||
imageSrc?: string[]
|
alt?: string
|
||||||
|
src: string[]
|
||||||
|
}
|
||||||
onValueChange: (value: boolean) => void
|
onValueChange: (value: boolean) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -36,8 +38,8 @@ const SwitchTableField = (props: Props) => {
|
||||||
|
|
||||||
const classes = classNames(
|
const classes = classNames(
|
||||||
{
|
{
|
||||||
SwitchTableField: true,
|
switch: true,
|
||||||
Disabled: props.disabled,
|
disabled: props.disabled,
|
||||||
},
|
},
|
||||||
props.className
|
props.className
|
||||||
)
|
)
|
||||||
|
|
@ -47,9 +49,7 @@ const SwitchTableField = (props: Props) => {
|
||||||
name={props.name}
|
name={props.name}
|
||||||
description={props.description}
|
description={props.description}
|
||||||
className={classes}
|
className={classes}
|
||||||
imageAlt={props.imageAlt}
|
image={props.image}
|
||||||
imageClass={props.imageClass}
|
|
||||||
imageSrc={props.imageSrc}
|
|
||||||
label={props.label}
|
label={props.label}
|
||||||
>
|
>
|
||||||
<Switch
|
<Switch
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,6 @@
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover .Left .Info h3 {
|
|
||||||
color: var(--accent-blue);
|
|
||||||
}
|
|
||||||
|
|
||||||
&.numeric .right > .input,
|
&.numeric .right > .input,
|
||||||
&.numeric .right > .duration {
|
&.numeric .right > .duration {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue