npm i styled-components
npm i --save-dev @types/styled-components
import { createGlobalStyle, ThemeProvider } from "styled-components";
const GlobalStyle = createGlobalStyle`
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, menu, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
main, menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, main, menu, nav, section {
display: block;
}
/* HTML5 hidden-attribute fix for newer browsers */
*[hidden] {
display: none;
}
body {
line-height: 1;
}
menu, ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
* {
box-sizing: border-box;
}
a{
text-decoration:none;
color:inherit;
}
button{
background-color: inherit;
cursor: pointer;
}
`;
function App() {
return (
<>
<GlobalStyle />
<div></div>
</>
);
}
export default App;
'Front-end > React' 카테고리의 다른 글
React) useContext 기본 구조 (0) | 2023.02.08 |
---|---|
React) 다양한 React 프로젝트 생성 방법 (NPM/Yarn, JS/TS) (0) | 2023.01.31 |
React + TS) React Query 기본 사용법 (0) | 2023.01.16 |
React) router.tsx 세팅 (0) | 2023.01.16 |
React + TS) Theme 세팅 ... Theme Provider (0) | 2023.01.16 |