Skip to content

Commit

Permalink
docs: init
Browse files Browse the repository at this point in the history
  • Loading branch information
afeiship committed Dec 12, 2019
1 parent df6a093 commit cfc5212
Showing 1 changed file with 27 additions and 28 deletions.
55 changes: 27 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
npm install -S @feizheng/react-card
```
## properties
| property | type | description |
| --------------- | ---- | ----------- |
| className | - | - |
| value | - | - |
| onChange | - | - |
| property | default | default | description |
| ---------- | ------- | ------- | ----------- |
| className | String | - | - |
| hoverable | Boolean | false | - |
| clickable | Boolean | false | - |
| shadowable | Boolean | true | - |

## usage
1. import css
Expand All @@ -22,35 +23,33 @@ npm install -S @feizheng/react-card
```
2. import js
```js
import React from 'react';
import ReactCard from '../src/main';
import ReactDOM from 'react-dom';
import ReactCard from '@feizheng/react-card';

// your app:
class App extends React.Component{
render(){
import React from 'react';
import './assets/style.scss';

class App extends React.Component {
componentDidMount() { }
render() {
return (
<ReactCard />
)
<div className="app-container">
<ReactCard>
<img src="http://himg.bdimg.com/sys/portrait/item/be10475f686d6c73db00.jpg" width="100%" />
</ReactCard>

<ReactCard>
<p>少年时,想碰到一个聂小倩,拼了性命爱一场,天亮前带着她的魂魄远走他乡。</p>
<p>青年时,想碰到一个白素贞,家大业大,要啥有啥,吃完软饭一抹嘴,还有人负责把她关进雷峰塔。</p>
<p>中年时,想要一个田螺姑娘,温婉可人,红袖添香,半夜写累了,让她变回原形,加干辣椒、花椒、姜、蒜片爆炒,淋入香油,起锅装盘。</p>
</ReactCard>
</div>
);
}
}

// render to dom:
ReactDOM.render(<App/>, document.getElementById('app'));
ReactDOM.render(<App />, document.getElementById('app'));

```

## documentation
- https://afeiship.github.io/react-card/

## resources
- https://www.robinwieruch.de/minimal-react-webpack-babel-setup/
- https://www.valentinog.com/blog/react-webpack-babel/
- https://jestjs.io/docs/en/tutorial-react#snapshot-testing-with-mocks-enzyme-and-react-16
- https://testing-library.com/docs/react-testing-library/api

## todos
- [ ] Add: semver number for every build files.
- [ ] Add: need output css files.
- [ ] Add: PWA support for docs.
- [ ] Add: source.map file for dist(`you can upload for production debug`).
- [ ] BUG: npm run dev will clean dist.

0 comments on commit cfc5212

Please sign in to comment.