mirror of
https://github.com/zhigang1992/react-content-loader.git
synced 2026-04-01 22:41:23 +08:00
Correct writing
This commit is contained in:
@@ -25,14 +25,13 @@ const MyPage = () => (<ContentLoader />);
|
||||
| type | _String_ | `facebook` | Options: `facebook`, `instagram` |
|
||||
| speed | _Number_ | `2` | Animation speed |
|
||||
| primaryColor | _String_ | `#f3f3f3` | Background the SVG |
|
||||
| secundaryColor | _String_ | `ecebeb` | Animation color |
|
||||
| secondaryColor | _String_ | `#ecebeb` | Animation color |
|
||||
|
||||
|
||||
### Todo
|
||||
- [ ] Code component;
|
||||
- [ ] List component;
|
||||
- [ ] Test in several browser;
|
||||
- [ ] Better documentation;
|
||||
- [ ] Test in multiples browser;
|
||||
- [ ] A more useful new project;
|
||||
|
||||
#### Credits
|
||||
|
||||
@@ -20,7 +20,7 @@ const FacebookStyle = (props ) => {
|
||||
<stop offset="0%" stopColor={props.primaryColor}>
|
||||
<animate attributeName="offset" values="-2; 1" dur={`${props.speed}s`} repeatCount="indefinite" />
|
||||
</stop>
|
||||
<stop offset="50%" stopColor={props.secundaryColor}>
|
||||
<stop offset="50%" stopColor={props.secondaryColor}>
|
||||
<animate attributeName="offset" values="-1.5; 1.5" dur={`${props.speed}s`} repeatCount="indefinite" />
|
||||
</stop>
|
||||
<stop offset="100%" stopColor={props.primaryColor}>
|
||||
|
||||
@@ -18,7 +18,7 @@ const InstagramStyle = (props ) => {
|
||||
<stop offset="0%" stopColor={props.primaryColor}>
|
||||
<animate attributeName="offset" values="-2; 1" dur={`${props.speed}s`} repeatCount="indefinite" />
|
||||
</stop>
|
||||
<stop offset="50%" stopColor={props.secundaryColor}>
|
||||
<stop offset="50%" stopColor={props.secondaryColor}>
|
||||
<animate attributeName="offset" values="-1.5; 1.5" dur={`${props.speed}s`} repeatCount="indefinite" />
|
||||
</stop>
|
||||
<stop offset="100%" stopColor={props.primaryColor}>
|
||||
|
||||
@@ -27,7 +27,7 @@ class ContentLoader extends Component {
|
||||
type: props.type || 'facebook',
|
||||
speed: props.speed || 2,
|
||||
primaryColor: props.primaryColor || '#f3f3f3',
|
||||
secundaryColor: props.secundaryColor || '#ecebeb',
|
||||
secondaryColor: props.secondaryColor || '#ecebeb',
|
||||
classNameHash: hashCode()
|
||||
}
|
||||
}
|
||||
@@ -57,7 +57,7 @@ ContentLoader.propTypes = {
|
||||
type: React.PropTypes.string,
|
||||
speed: React.PropTypes.number,
|
||||
primaryColor: React.PropTypes.string,
|
||||
secundaryColor: React.PropTypes.string
|
||||
secondaryColor: React.PropTypes.string
|
||||
}
|
||||
|
||||
export default ContentLoader
|
||||
|
||||
Reference in New Issue
Block a user