Skip to content
This repository was archived by the owner on Dec 21, 2024. It is now read-only.

Commit 9632e05

Browse files
committed
update input max button
1 parent 777b9ac commit 9632e05

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

components/src/components/Input/Input.test.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ describe('<Input />', () => {
4545
expect(element).toHaveValue(null)
4646
userEvent.click(screen.getByText('Max'))
4747
expect(element).toHaveValue(20)
48+
49+
expect(screen.getByText('Max')).toHaveAttribute('type', 'button')
4850
})
4951

5052
it('units', () => {

components/src/components/Input/Input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export const Input = React.forwardRef(
218218

219219
{max && (
220220
<Box alignItems="center" display="flex" paddingRight={suffix ? undefined : '4'}>
221-
<Box as="button" className={styles.max} onClick={handleMax}>
221+
<Box as="button" className={styles.max} type="button" onClick={handleMax}>
222222
Max
223223
</Box>
224224
</Box>

0 commit comments

Comments
 (0)