({control, value, onChange}: ControlProps)
| 1597 | } |
| 1598 | |
| 1599 | function SizeControl({control, value, onChange}: ControlProps) { |
| 1600 | return ( |
| 1601 | <Wrapper control={control} styles={style({gridColumnStart: 1, gridColumnEnd: -1})}> |
| 1602 | <div className={style({display: 'flex', gap: 4, width: controlWidth})}> |
| 1603 | <NumberField |
| 1604 | aria-label="Width" |
| 1605 | placeholder="–" |
| 1606 | value={value?.width} |
| 1607 | onChange={width => onChange(new Size(width, value?.height ?? 0))} |
| 1608 | styles={style({flexShrink: 1, flexGrow: 1})} |
| 1609 | hideStepper |
| 1610 | /> |
| 1611 | <NumberField |
| 1612 | aria-label="Height" |
| 1613 | placeholder="–" |
| 1614 | value={value?.height} |
| 1615 | onChange={height => onChange(new Size(value?.width ?? 0, height))} |
| 1616 | styles={style({flexShrink: 1, flexGrow: 1})} |
| 1617 | hideStepper |
| 1618 | /> |
| 1619 | </div> |
| 1620 | </Wrapper> |
| 1621 | ); |
| 1622 | } |
nothing calls this directly
no test coverage detected