Skip to content

Commit b48b823

Browse files
authored
docs: remove duplicate line, fix typos (#835)
* Delete duplicate line in use-modal.mdx * Fix typos in documentation
1 parent 9e5ceed commit b48b823

File tree

5 files changed

+20
-21
lines changed

5 files changed

+20
-21
lines changed

pages/en-us/components/badge.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Display an indicator that requires attention.
6060
<Badge style={{ backgroundColor: theme.palette.alert }}>Alert</Badge> <Spacer h={.5} />
6161
<Badge style={{ backgroundColor: theme.palette.purple }}>Purple</Badge> <Spacer h={.5} />
6262
<Badge style={{ backgroundColor: theme.palette.violet }}>Violet</Badge> <Spacer h={.5} />
63-
<Badge style={{ backgroundColor: theme.palette.cyanLighter, color: theme.palette.foreground }}>Cyan Ligher</Badge> <Spacer h={.5} />
63+
<Badge style={{ backgroundColor: theme.palette.cyanLighter, color: theme.palette.foreground }}>Cyan Lighter</Badge> <Spacer h={.5} />
6464
</>
6565
)
6666
}

pages/en-us/components/divider.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ A divider line separates different content.
3131

3232
<Playground
3333
title="With Text"
34-
desc="Display text or components in diriver."
34+
desc="Display text or components in divider."
3535
scope={{ Divider, Text }}
3636
code={`
3737
<>
@@ -109,7 +109,7 @@ A divider line separates different content.
109109

110110
| Attribute | Description | Type | Accepted values | Default |
111111
| --------- | ----------------- | ----------------------------- | -------------------------------- | --------- |
112-
| **type** | type of divier | [DividerTypes](#dividertypes) | - | `default` |
112+
| **type** | type of divider | [DividerTypes](#dividertypes) | - | `default` |
113113
| **align** | alignment of text | [DividerAlign](#divideralign) | - | `center` |
114114
| ... | native props | `HTMLAttributes` | `'id', 'name', 'className', ...` | - |
115115

pages/en-us/components/table.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ const MyComponent = () => (
207207
| Attribute | Description | Type | Accepted values | Default |
208208
| ---------------- | -------------------------------------------- | ----------------------------------------------------- | ------------------ | ------- |
209209
| **data** | data source | `Array<T>` | - | - |
210-
| **initialData** | inital datas | `Array<T>` | - | `[]` |
210+
| **initialData** | initial data | `Array<T>` | - | `[]` |
211211
| **emptyText** | displayed text when table's content is empty | `string` | - | - |
212212
| **hover** | table's hover effect | `boolean` | - | `true` |
213213
| **onRow** | callback row's content by click | [TableOnRowClick](#tableonrowclick) | - | - |
@@ -238,7 +238,7 @@ type TableOnRowClick<T> = (rowData: T, rowIndex: number) => void
238238
type TableOnCellClick<T> = (
239239
value: T[keyof T],
240240
rowIndex: number,
241-
colunmIndex: number,
241+
columnIndex: number,
242242
) => void
243243
```
244244

pages/en-us/hooks/use-classes.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Any value that can be implicitly typed to false will be ignored:
7171
useClasses('') // output -> ""
7272
useClasses(null) // output -> ""
7373
useClasses('btn', undefined) // output -> "btn"
74-
useClasses({ actived: null }) // output -> ""
74+
useClasses({ active: null }) // output -> ""
7575
useClasses(0) // output -> ""
7676
useClasses(false, 'btn', '') // output -> "btn"
7777
```

pages/en-us/hooks/use-modal.mdx

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import { Layout, Playground, Attributes } from 'lib/components'
2-
import { useModal, Modal, Button } from 'components'
1+
import { Layout, Playground, Attributes } from "lib/components";
2+
import { useModal, Modal, Button } from "components";
33

44
export const meta = {
5-
title: 'useModal',
6-
group: 'Enhancement',
5+
title: "useModal",
6+
group: "Enhancement",
77
index: 11,
8-
}
8+
};
99

1010
## useModal
1111

1212
`useModal` provides automatic binding for component [Modal](/en-us/components/modal), which can reduce the amount of repetitive code and improve the development experience.
1313
Using this hooks behaves the same as if you had added `React.useState` manually.
1414

15-
This hooks also supports use on [Select component](/en-us/components/select 'Select Component').
15+
This hooks also supports use on [Select component](/en-us/components/select "Select Component").
1616

1717
<Playground
1818
desc="Use hooks to control `Modal`."
@@ -42,17 +42,16 @@ This hooks also supports use on [Select component](/en-us/components/select 'Sel
4242

4343
```ts
4444
type useModal = (initialVisible: boolean) => {
45-
visible: boolean
46-
setVisible: Dispatch<SetStateAction<boolean>>
47-
setVisible: Dispatch<SetStateAction<boolean>>
48-
currentRef: MutableRefObject<boolean>
45+
visible: boolean;
46+
setVisible: Dispatch<SetStateAction<boolean>>;
47+
currentRef: MutableRefObject<boolean>;
4948
bindings: {
50-
visible: boolean
51-
onClose: () => void
52-
}
53-
}
49+
visible: boolean;
50+
onClose: () => void;
51+
};
52+
};
5453
```
5554

5655
</Attributes>
5756

58-
export default ({ children }) => <Layout meta={meta}>{children}</Layout>
57+
export default ({ children }) => <Layout meta={meta}>{children}</Layout>;

0 commit comments

Comments
 (0)