Update table field components

The structure of TableField's image props have changed
This commit is contained in:
Justin Edmund 2023-06-30 13:10:08 -07:00
parent f9ba98ca82
commit 9a16574948
3 changed files with 18 additions and 20 deletions

View file

@ -11,9 +11,11 @@ interface Props {
description?: string
value?: number
className?: string
imageAlt?: string
imageClass?: string
imageSrc?: string[]
image?: {
className?: String
alt?: string
src: string[]
}
min: number
max: number
step: number
@ -47,10 +49,8 @@ const SliderTableField = (props: Props) => {
return (
<TableField
name={props.name}
className="SliderField"
imageAlt={props.imageAlt}
imageClass={props.imageClass}
imageSrc={props.imageSrc}
className="slider"
image={props.image}
label={props.label}
>
<Slider
@ -63,13 +63,15 @@ const SliderTableField = (props: Props) => {
onValueCommit={handleValueCommit}
/>
<Input
className="Bound"
className="number"
bound={true}
type="number"
value={`${value}`}
min={props.min}
max={props.max}
step={props.step}
onChange={handleInputChange}
hide1Password={false}
/>
</TableField>
)

View file

@ -13,9 +13,11 @@ interface Props extends React.HTMLAttributes<HTMLDivElement> {
value?: boolean
className?: string
tabIndex?: number
imageAlt?: string
imageClass?: string
imageSrc?: string[]
image?: {
className?: String
alt?: string
src: string[]
}
onValueChange: (value: boolean) => void
}
@ -36,8 +38,8 @@ const SwitchTableField = (props: Props) => {
const classes = classNames(
{
SwitchTableField: true,
Disabled: props.disabled,
switch: true,
disabled: props.disabled,
},
props.className
)
@ -47,9 +49,7 @@ const SwitchTableField = (props: Props) => {
name={props.name}
description={props.description}
className={classes}
imageAlt={props.imageAlt}
imageClass={props.imageClass}
imageSrc={props.imageSrc}
image={props.image}
label={props.label}
>
<Switch

View file

@ -14,10 +14,6 @@
flex-direction: column;
}
&:hover .Left .Info h3 {
color: var(--accent-blue);
}
&.numeric .right > .input,
&.numeric .right > .duration {
text-align: right;