componentes con estilo
npm install --save styled-components
# yarn
yarn add styled-components
Salo Hopeless
npm install --save styled-components
# yarn
yarn add styled-components
npm install styled-components
npm install --save-dev @types/styled-components
// yarn
yarn add styled-components
yarn add --save-dev @types/styled-components
import styled from 'styled-components'
const RedText = styled.p`
color: red;
`
class App extends Component {}
import React from "react";
import styled from "styled-components";
export default function Wrapper({ children }) {
return (
<div>
<StyledButton>{children}</StyledButton>
</div>
);
}
const StyledButton = styled("div")`
padding: 10px;
margin: 10px;
`;
npm install --save styled-components
render() {
return (
<RedText>
Example Text
</RedText>
);
}