modal

export const ModalContainer = styled.div` // TODO : Modal을 구현하는데 전체적으로 필요한 CSS를 구현합니다. `; // TODO : Modal이 떴을 때의 배경을 깔아주는 CSS를 구현합니다. export const ModalBackdrop = styled.div` position: fixed; /* Stay in place */ z-index: 1; /* Sit on top */ left: 0; top: 0; width: 100%; /* Full width */ height: 100%; /* Full height */ overflow: auto; /* Enable scroll if needed */ background-color: rgb(0,0,0); /* Fallback color */ background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ `; export const ModalView = styled.div.attrs(props => ({ // attrs 메소드를 이용해서 아래와 같이 div 엘리먼트에 속성을 추가할 수 있습니다. role: 'dialog' }))` // TODO : Modal창 CSS를 구현합니다. background-color: #fefefe; margin: 15% auto; /* 15% from the top and centered */ padding: 20px; border: 1px solid #888; width: 80%; `;
JavaScript
복사