react styled components background image code example
Example 1: background image with styled components
const Content = styled.div`
background-image: url(${props => props.img});
`;
<Content img={ImagePath} />
Example 2: how to add background image in styled components
import styled from 'styled-components';
import img from './img/bg.gif';
const Content = styled.div`
border: 1px solid #000;
background-image: url(${img});
width: 2000px;
height: 2000px;
`;