1
2const Content = styled.div`
3 background-image: url(${props => props.img});
4`;
5<Content img={ImagePath} />
6
1import styled from 'styled-components';
2import img from './img/bg.gif';
3
4const Content = styled.div`
5 border: 1px solid #000;
6 background-image: url(${img});
7 width: 2000px;
8 height: 2000px;
9`;
10