1.0.1 • Published 4 years ago

styled-sanitize.css v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

styled-sanitize

Sanitize.css for styled-components


Installation:

npm install styled-sanitize.css

or

yarn add styled-sanitize.css

Usage:

import React from "react";
import Sanitize from "styled-sanitize.css";

const App = () => (
  <>
    <Sanitize />
    <h1>Hello world</h1>
  </>
);

You can also use the named export to customize:

import React from 'react';
import { createGlobalStyle } from 'styled-components';
import { sanitize } from 'styled-sanitize.css';

const GlobalStyle = createGlobalStyle`
  ${sanitize}
  /* more styles */
`

const App = () => (
  <>
    <GlobalStyle />
    <h1>Hello world</h1>
  </>
}