(value: number)
| 25 | const VariableButton = observer( |
| 26 | ({ state$, tag, label, axes, description }: VariableButtonProps) => { |
| 27 | const handleVariation = (value: number) => { |
| 28 | // If ital is changed, set italic to true |
| 29 | if (tag === 'ital' && value > 0) { |
| 30 | state$.preview.italic.set(true); |
| 31 | } else if (tag === 'ital' && value === 0) { |
| 32 | state$.preview.italic.set(false); |
| 33 | } |
| 34 | state$.variable.assign({ [tag]: value }); |
| 35 | }; |
| 36 | |
| 37 | const resetVariation = () => { |
| 38 | if (tag === 'ital') state$.preview.italic.set(false); |