Skip to content

Commit

Permalink
📝docs: fix theme api appearance typo (#91)
Browse files Browse the repository at this point in the history
Co-authored-by: yanghaixiao <[email protected]>
  • Loading branch information
SeaHaiWorld and yanghaixiao authored Aug 10, 2023
1 parent 7685f45 commit 693d1bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/guide/styled.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ const StyledButton = styled(Button)`
`;

const App = () => {
const [apperance] = useState('light');
const [appearance] = useState('light');
return (
<ThemeProvider theme={{ primary: apperance === 'light' ? 'blue' : 'cyan' }}>
<ThemeProvider theme={{ primary: appearance === 'light' ? 'blue' : 'cyan' }}>
<StyledButton>Click me</StyledButton>
</ThemeProvider>
);
Expand Down
4 changes: 2 additions & 2 deletions docs/guide/switch-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ demo:

## 1. 亮暗色主题切换

通过在容器组件 [ThemeProvider](/usage/theme-provider) 上修改 `apperance` props,即可实现主题切换,这是也是动态主题最简单的使用方式。
通过在容器组件 [ThemeProvider](/usage/theme-provider) 上修改 `appearance` props,即可实现主题切换,这是也是动态主题最简单的使用方式。

```tsx | pure
import { ThemeProvider } from 'antd-style';

export default () => {
return (
// 自动变为暗色模式
<ThemeProvider apperance={'dark'}>
<ThemeProvider appearance={'dark'}>
<App />
</ThemeProvider>
);
Expand Down

0 comments on commit 693d1bf

Please sign in to comment.