You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ui-number-input): rewrite NumberInput to the new theming system
- Converted `NumberInput` from class-based to functional component
- It uses the theme from TextInput, they are the same in Figma
- The styling of the upper label/messages are not done, they are coming
in `FormFieldLayout`
Tokens are also not fully used (they are used only in `TextInput`):
- `fontSizeSm`, `heightSm`, `paddingHorizontalSm`: This component has no
small size
- `gapContent`: This is a gap between the text and elements rendered
after it, `NumberInput` does not have such
To test:
- Check the examples in the docs, they should function exactly as before
- Compare its CSS to the ones in Figma
Completes INSTUI-4814
Copy file name to clipboardExpand all lines: packages/ui-number-input/src/NumberInput/README.md
+34-9Lines changed: 34 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,7 @@ Note that this field **does not work
8
8
uncontrolled** - you must pass event handlers if you want it to respond to
9
9
user input.
10
10
11
-
This example handles arrow buttons, up/down arrow keys, and typing into
12
-
the input. It also includes an `onBlur` handler that displays an error message
13
-
if the input is invalid or missing.
11
+
This example handles arrow buttons, up/down arrow keys, and typing into the input. It also includes an `onBlur` handler that displays an error message if the input is invalid or missing.
14
12
15
13
```js
16
14
---
@@ -150,16 +148,43 @@ render(<Example />)
150
148
151
149
> Note: `NumberInput` accepts a string or number as its `value`. However, the value returned by the `onChange` callback is always a string and should be converted to a number before attempting to augment it.
152
150
153
-
NumberInput comes in 2 sizes. The default size is "medium".
151
+
You can see here most of the visual states of the component.
0 commit comments