Having issues with my style components displaying in a web application I'm developing using React and Ruby on Rails. Everything was working fine until I added a third style component, now even after removing it, nothing shows up on the screen after running rails.
Here is the code snippet:
import styled from 'styled-components'
const Section = styled.section`
background-color: #d74234
min-height: 550px;
padding: 100px 0;
color: #fff;
`;
const Header = styled.h1`
color: #fff;
font-weight: 700;
font-size: 40px;
line-height: 52px
`;
const Subhead = styled.p`
font-size: 18px;
font-weight: 500;
`;
const Button = styled.a`
display: inline-block;
text-decoration: none;
font-weight: bold;
cursor: pointer;
border-radius: 0;
background: #fff;
color: #333 !important;
padding: 10px 20px;
font-size: 18px;
width: 100%;
box-shadow: 0px 0px 0px 3px #473228,
-6px 6px #ef5f17,
-6px 6px 0px 3px #473228;
`;
const Jumbotron = () => {
return (
<Section className="home-section--1">
<div className="container">
<div className="row">
<div className="col col-sm-12 col-md-5">
<div className="pt-4 mt-4">
<Header>Curiosity Voyage!</Header>
<Subhead>Where all your random questions are answered</Subhead>
<div className = "cta-wrapper">
<Button className= "btn fancy-btn">Explore</Button>
</div>
</div>
</div>
<div className="col col-sm-12 col-md-7">
<div className="pt-4 mt-4 text-center">
</div>
</div>
</div>
</div>
</Section>
)
}
export default Jumbotron
I've tried two solutions but they didn't work - adding backticks before semi-colons and adding curly braces before styling tags.
Upon checking Visual Studio for info on styled-components within the section tag, I received this message:
const Button: 'StyledComponent<"a", any, {}, never> All tags have the same message, indicating that styled-components within Jumbtron are not being read. Any help would be appreciated. Thank you!