Is it possible to style Text or Paragraphs with styled-components? If yes, how can I pass text into the component?
For example, I had this Footer component:
const Footer = () => (
<footer className="site-footer">
<p className="text"> HELLO</p>
<Copyright
link={'https://hotmail.com'}
text={'HELOO'}></Copyright>
</footer>
);
export default Footer;
I wanted to switch from global classes to css in js, which is why I thought of using styled-components. Now I tried this:
export const StyledText = styled.text`
text: Hellooo
color: white;
text-align: center;
`
But if I comment out the paragraph and use StyledText component, nothing shows up. If I try passing Styled Component text={'HELLO'} my app crashes. How can I convert my footer in such a way that it uses styled-components?