chore(examples): add custom-styles

This commit is contained in:
unix
2020-04-12 08:45:24 +08:00
parent a29707b4aa
commit 38075b7486
7 changed files with 10795 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
## Custom styles

View File

@@ -0,0 +1,32 @@
{
"name": "custom-styles",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"dev": "react-scripts start",
"build": "react-scripts build"
},
"dependencies": {
"@zeit-ui/react": "^0.0.1-beta.25",
"react": "^16.13.1",
"react-dom": "^16.13.1"
},
"devDependencies": {
"@types/react": "^16.9.32",
"@types/react-dom": "^16.9.6",
"react-scripts": "^3.4.1"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Custom styles</title>
</head>
<body>
<div id="app"></div>
</body>
</html>

View File

@@ -0,0 +1,17 @@
import React from 'react'
import { Card, Text } from '@zeit-ui/react'
import './style.css'
const Home = () => (
<div className="my-app">
<Card shadow style={{ width: '500px', margin: '100px auto' }}>
<Text className="my-text">Modern and minimalist React UI library.</Text>
<Text type={'success'} style={{ color: '#000' }}>Modern and minimalist React UI library.</Text>
<Text type={'warning'} style={{ color: '#000' }}>Modern and minimalist React UI library. </Text>
<Text type={'error'} style={{ color: '#000' }}>Modern and minimalist React UI library. </Text>
<Text type={'secondary'} style={{ color: '#000' }}>Modern and minimalist React UI library.</Text>
</Card>
</div>
)
export default Home

View File

@@ -0,0 +1,24 @@
import React from 'react'
import ReactDom from 'react-dom'
import { ZEITUIProvider, CSSBaseline } from '@zeit-ui/react'
import Home from './home'
const App = () => {
return (
<ZEITUIProvider>
<CSSBaseline />
<Home />
</ZEITUIProvider>
)
}
ReactDom.render(
(
<React.StrictMode>
<App />
</React.StrictMode>
),
document.getElementById('app')
)
export default App

View File

@@ -0,0 +1,11 @@
.my-app .my-text {
font-size: 1rem;
color: #000;
text-transform: uppercase;
display: inline-flex;
width: 100%;
margin: 1rem auto !important;
align-items: center;
justify-content: center;
text-align: center;
}

File diff suppressed because it is too large Load Diff