Skip to content

Commit

Permalink
feat(numberfield,textfield): convert to TypeScript and export types
Browse files Browse the repository at this point in the history
BREAKING CHANGE: NumberField onChange is now called with a number instead of a string
  • Loading branch information
WesSouza authored and arturbien committed Jul 27, 2022
1 parent ec7c478 commit 64e4279
Show file tree
Hide file tree
Showing 14 changed files with 414 additions and 376 deletions.
2 changes: 1 addition & 1 deletion src/AppBar/AppBar.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ menu: Components
import { AppBar } from './AppBar';
import Toolbar from '../Toolbar/Toolbar';
import { Button } from '../Button/Button';
import TextField from '../TextField/TextField';
import { TextField } from '../TextField/TextField';
import List from '../List/List';
import ListItem from '../ListItem/ListItem';
import Divider from '../Divider/Divider';
Expand Down
2 changes: 1 addition & 1 deletion src/DatePicker/DatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import styled from 'styled-components';

import { Button } from '../Button/Button';
import { Cutout } from '../Cutout/Cutout';
import NumberField from '../NumberField/NumberField';
import { NumberField } from '../NumberField/NumberField';
import Select from '../Select/Select';
import Toolbar from '../Toolbar/Toolbar';
import Window from '../Window/Window';
Expand Down
200 changes: 0 additions & 200 deletions src/NumberField/NumberField.js

This file was deleted.

24 changes: 12 additions & 12 deletions src/NumberField/NumberField.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: NumberField
menu: Components
---

import NumberField from './NumberField';
import { NumberField } from './NumberField';
import { Cutout } from '../Cutout/Cutout';

# NumberField
Expand Down Expand Up @@ -52,17 +52,17 @@ import { Cutout } from '../Cutout/Cutout';

<Playground>
<Cutout style={{ padding: '2rem', width: '300px' }}>
<p style={{ lineHeight: 1.3, marginBottom: '1rem' }}>
When you want to use NumberField on a light background (like scrollable
content), just use the flat variant:
</p>
<NumberField
variant='flat'
shadow={false}
value={1991}
onChange={value => console.log(value)}
/>
</Cutout>
<p style={{ lineHeight: 1.3, marginBottom: '1rem' }}>
When you want to use NumberField on a light background (like scrollable
content), just use the flat variant:
</p>
<NumberField
variant='flat'
shadow={false}
value={1991}
onChange={value => console.log(value)}
/>
</Cutout>
</Playground>

## API
Expand Down
Loading

0 comments on commit 64e4279

Please sign in to comment.