styled-skeleton
v1.0.0
Published
Skeleton.css for your styled-components
Downloads
3
Maintainers
Readme
styled-skeleton
Single file with skeleton.css for your styled-components
Original skeleton.css copied and adapted from dhg/Skeleton
Structure borrowed from styled-normalize
Usage
yarn add styled-skeleton styled-components
JavaScript
// ----- styles/index.js
import styledSkeleton from 'styled-skeleton';
import { injectGlobal } from 'styled-components';
export default () => injectGlobal`
${styledSkeleton}
body {
padding: 0;
background-color: pink;
}
`;
// ----- client.js
// ... imports
import baseStyles from './styles/index';
const render = () => {
baseStyles();
ReactDOM.render(<AppContainer />, document.getElementById('app-root'));
};
render();
With named import
// ES Modules
import { skeleton, version } from 'styled-skeleton';
// CommonJS
const { skeleton, version } = require('styled-skeleton');
ServerSide Rendering
Styled-components supports SSR, you can read discussion or open RURARAR