-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
71 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,81 @@ | ||
# react-digital | ||
> React digital | ||
|
||
## properties: | ||
```javascript | ||
AUTO_PROPERTIES | ||
|
||
static propTypes = { | ||
className: PropTypes.string, | ||
value: PropTypes.any, | ||
}; | ||
|
||
static defaultProps = { | ||
value: ':' | ||
}; | ||
|
||
``` | ||
|
||
## install && import: | ||
```bash | ||
npm install --save afeiship/react-digital --registry=https://registry.npm.taobao.org | ||
``` | ||
|
||
```js | ||
import ReactDigital from 'react-digital'; | ||
``` | ||
|
||
```scss | ||
// customize your styles: | ||
$react-digital-options:( | ||
); | ||
|
||
@import 'node_modules/react-digital/dist/style.scss'; | ||
``` | ||
|
||
|
||
## usage: | ||
```jsx | ||
AUTO_USAGE | ||
|
||
// install: npm install afeiship/react-digital --save | ||
// import : import ReactDigital from 'react-digital' | ||
|
||
class App extends React.Component{ | ||
state = { | ||
}; | ||
|
||
constructor(props){ | ||
super(props); | ||
window.demo = this; | ||
window.refs = this.refs; | ||
window.rc = this.refs.rc; | ||
} | ||
|
||
render(){ | ||
return ( | ||
<div className="hello-react-digital"> | ||
<ReactDigital value={2} /> | ||
<ReactDigital value={0} /> | ||
<ReactDigital value={1} /> | ||
<ReactDigital value={7} /> | ||
<ReactDigital value={'-'} /> | ||
<ReactDigital value={1} /> | ||
<ReactDigital value={2} /> | ||
<ReactDigital value={'-'} /> | ||
<ReactDigital value={0} /> | ||
<ReactDigital value={7} /> | ||
<div className="mr5_" style={{ fontSize: 10, marginTop: 20}}> | ||
<ReactDigital className="dib" value={0} /> | ||
<ReactDigital className="dib" value={0} /> | ||
<ReactDigital className="dib" value={':'} /> | ||
<ReactDigital className="dib" value={1} /> | ||
<ReactDigital className="dib" value={6} /> | ||
<ReactDigital className="dib" value={':'} /> | ||
<ReactDigital className="dib" value={0} /> | ||
<ReactDigital className="dib" value={0} /> | ||
</div> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
``` |