mirror of
https://github.com/zhigang1992/react.git
synced 2026-01-25 13:17:52 +08:00
chore(examples): update deps for custom-themes
This commit is contained in:
@@ -1,3 +1,15 @@
|
||||
## Custom themes example
|
||||
## Custom themes
|
||||
|
||||
This is an example of **how to custom Themes in `zeit-ui`**.
|
||||
|
||||
## Getting Started
|
||||
|
||||
First, run the development server:
|
||||
|
||||
```bash
|
||||
npm i && npm run dev
|
||||
# or
|
||||
yarn && yarn dev
|
||||
```
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"build": "react-scripts build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@zeit-ui/react": "^0.0.1-beta.17",
|
||||
"@zeit-ui/react": "latest",
|
||||
"react": "^16.13.1",
|
||||
"react-dom": "^16.13.1"
|
||||
},
|
||||
|
||||
@@ -5,7 +5,7 @@ const Home = () => {
|
||||
const theme = useTheme()
|
||||
|
||||
return (
|
||||
<Card shadow style={{ width: '500px', margin: '100px auto' }}>
|
||||
<Card shadow>
|
||||
<Text>Modern and minimalist React UI library.</Text>
|
||||
<Text type={'success'}>
|
||||
Modern and minimalist React UI library. <Tag>{theme.palette.success}</Tag>
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
import React from 'react'
|
||||
import ReactDom from 'react-dom'
|
||||
import { ZEITUIProvider, CSSBaseline } from '@zeit-ui/react'
|
||||
import { ZeitProvider, CssBaseline, Page } from '@zeit-ui/react'
|
||||
import Home from './home'
|
||||
import Theme from './theme'
|
||||
|
||||
const App = () => {
|
||||
return (
|
||||
<ZEITUIProvider theme={Theme}>
|
||||
<CSSBaseline />
|
||||
<Home />
|
||||
</ZEITUIProvider>
|
||||
<ZeitProvider theme={Theme}>
|
||||
<CssBaseline />
|
||||
<Page size="mini">
|
||||
<Home />
|
||||
</Page>
|
||||
</ZeitProvider>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user