Skip to content

Commit

Permalink
Add uiw example.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Sep 8, 2019
1 parent c1936fb commit fb0d47e
Show file tree
Hide file tree
Showing 12 changed files with 182 additions and 0 deletions.
15 changes: 15 additions & 0 deletions example/uiw/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
node_modules
dist
npm-debug.log*
package-lock.json
.DS_Store
.cache
.rdoc-dist
.vscode

*.bak
*.tem
*.temp
#.swp
*.*~
~*.*
2 changes: 2 additions & 0 deletions example/uiw/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Default
===
38 changes: 38 additions & 0 deletions example/uiw/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "default",
"version": "1.0.0",
"description": "",
"private": true,
"scripts": {
"start": "kkt start",
"build": "kkt build",
"test": "kkt test --env=jsdom",
"test:coverage": "kkt test --env=jsdom --coverage"
},
"repository": {
"type": "git",
"url": "https://github.com/kktjs/kkt.git"
},
"author": "",
"license": "MIT",
"dependencies": {
"react": "^16.4.0",
"react-dom": "^16.4.0",
"uiw": "^3.4.0"
},
"devDependencies": {
"kkt": "file:../../"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Binary file added example/uiw/public/favicon.ico
Binary file not shown.
15 changes: 15 additions & 0 deletions example/uiw/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>KKT</title>
</head>

<body>
<div id="root"></div>
</body>

</html>
32 changes: 32 additions & 0 deletions example/uiw/src/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.App {
text-align: center;
}

.App-logo {
animation: App-logo-spin infinite 20s linear;
height: 40vmin;
}

.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}

.App-link {
color: #61dafb;
}

@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
34 changes: 34 additions & 0 deletions example/uiw/src/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from 'react';
import { Button } from 'uiw';
import logo from './logo.svg';
import styles from './App.module.css';
import './App.css';

const App = () => (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p className={styles.warpper}>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
<div className={styles.btns}>
<Button type="primary">主要按钮</Button>
<Button type="success">成功按钮</Button>
<Button type="warning">警告按钮</Button>
<Button type="danger">错误按钮</Button>
<Button type="light">亮按钮</Button>
<Button type="dark">暗按钮</Button>
</div>
</header>
</div>
);

export default App;
7 changes: 7 additions & 0 deletions example/uiw/src/App.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.app {
color: red;
}

.btns {
padding: 20px 0 0 0;
}
9 changes: 9 additions & 0 deletions example/uiw/src/App.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';

describe('<App />', () => {
test('renders without exploding', () => {
ReactDOM.render(<App />, document.createElement('div'));
});
});
14 changes: 14 additions & 0 deletions example/uiw/src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
body {
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace;
}
9 changes: 9 additions & 0 deletions example/uiw/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';

ReactDOM.render(
<App />,
document.getElementById('root'),
);
7 changes: 7 additions & 0 deletions example/uiw/src/logo.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fb0d47e

Please sign in to comment.