프로젝트
GitHub에서 보기
zautumnz/styled-reset
소개
Eric Meyer's Reset CSS for styled-components
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalstyled-reset
Eric Meyer's Reset CSS for styled-components
Also see styled-normalize from Sergey Sova.
Installation:
npm i styled-reset
Usage:
Styled Components 4+
import * as React from 'react'
import { Reset } from 'styled-reset'
const App = () => (
<React.Fragment>
<Reset />
<div>Hi, I'm an app!</div>
</React.Fragment>
)
You can also use the default export or named export (lowercase) in your own global style:
import * as React from 'react'
import { createGlobalStyle } from 'styled-components'
import reset from 'styled-reset'
const GlobalStyle = createGlobalStyle`
${reset}
/* other styles */
`
const App = () => (
<React.Fragment>
<GlobalStyle />
<div>Hi, I'm an app!</div>
</React.Fragment>
)
export default App
Styled Components 3.x
If you're using Styled Components version 3.x or 2.x, you'll need to use the
injectGlobal api instead (and install [email protected]):
import { injectGlobal } from 'styled-components'
import reset from 'styled-reset'
injectGlobal`
${reset}
`
reset is also available as a named export:
import { reset } from 'styled-reset'
Credits
All credit goes to Eric Meyer for reset.css. reset.css is public domain (unlicensed).
관련 프로젝트 살펴보기
불러오는 중…