Can we apply styling to text or paragraphs with styled-components? And if so, how can we insert text into the component?
For instance, consider 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 decided to transition from using global classes to css in js, which led me to think about utilizing styled-components. I attempted the following approach:
export const StyledText = styled.text`
text: Hellooo
color: white;
text-align: center;
`
However, when I remove the paragraph and use the StyledText component instead, nothing displays on screen. Attempting to pass Styled Component text={'HELLO'}
results in a crash. How can I transform my footer to utilize styled-components effectively?