react-loading-skeleton-placeholders
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"main": "./index.js", | ||
@@ -11,0 +11,0 @@ "keywords": [ |
@@ -7,3 +7,3 @@ # ☠️ react-loading-skeleton ☠️ | ||
``` | ||
npm install react-loading-skeleton | ||
npm install react-loading-skeleton-placeholders | ||
``` | ||
@@ -19,2 +19,17 @@ | ||
## Principles | ||
The `<Bone />` component is designed to be used directly in your components, in place of content while it is loading. Using a `<Bone />` will ensure the loading state remains up-to-date with any changes to your layout or typography. The `<Skeleton />` component is designed to be used as a generic placeholder for body text. | ||
``` | ||
class Article extends Component { | ||
render() { | ||
return ( | ||
<div style={{fontSize: 20, lineHeight: 2}}> | ||
<h1>{this.props.title || <Bone />}</h1> | ||
{this.props.body || <Skeleton count={10}/>} | ||
</div> | ||
); | ||
} | ||
} | ||
``` | ||
## Spin up Dev Env | ||
@@ -21,0 +36,0 @@ |
{ | ||
"name": "react-loading-skeleton-placeholders", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"main": "./lib/index.js", | ||
@@ -5,0 +5,0 @@ "engines": { |
@@ -7,3 +7,3 @@ # ☠️ react-loading-skeleton ☠️ | ||
``` | ||
npm install react-loading-skeleton | ||
npm install react-loading-skeleton-placeholders | ||
``` | ||
@@ -19,2 +19,17 @@ | ||
## Principles | ||
The `<Bone />` component is designed to be used directly in your components, in place of content while it is loading. Using a `<Bone />` will ensure the loading state remains up-to-date with any changes to your layout or typography. The `<Skeleton />` component is designed to be used as a generic placeholder for body text. | ||
``` | ||
class Article extends Component { | ||
render() { | ||
return ( | ||
<div style={{fontSize: 20, lineHeight: 2}}> | ||
<h1>{this.props.title || <Bone />}</h1> | ||
{this.props.body || <Skeleton count={10}/>} | ||
</div> | ||
); | ||
} | ||
} | ||
``` | ||
## Spin up Dev Env | ||
@@ -21,0 +36,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19626
65