모달에 Custom CSS 적용을 위한 props를 아래와 같이 제공한다.
필요한 속성에 맞게 사용하면 되지만, 모달 위치 및 리사이징을 위해서는 className, contentClassName을 수정해야 한다.
Props
className: YourCustomClass,
wrapClassName: YourCustomClass,
modalClassName: YourCustomClass,
backdropClassName: YourCustomClass,
contentClassName: YourCustomClass
작성 예시
<Modal
isOpen={modal}
toggle={toggle}
zIndex="310"
className="custom-modal"
contentClassName="modal-wrapper"
>
<ModalContents>
<Form>
<FormGroup>
<Label for="theme">대시보드 테마</Label>
<Input type="select" name="select" id="theme">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</Input>
</FormGroup>
<FormGroup>
<Label for="name">대시보드 이름</Label>
<Input
type="text"
name="name"
id="name"
placeholder="대시보드 이름"
/>
</FormGroup>
</Form>
</ModalContents>
</Modal>
(참고자료)
'Programming > React ; Redux' 카테고리의 다른 글
JSX란? (0) | 2021.05.21 |
---|---|
State 특성 3가지 (0) | 2021.05.21 |
React/Redux - 실수 모음집 (누적 중) (0) | 2021.05.15 |
React.memo 사용 예제 (0) | 2021.05.10 |
React Async 사용하기 - 1. useAsync, Helper components (0) | 2021.05.09 |