UNPKG

945 BMarkdownView Raw
1# Modal
2
3Implements a simple themeable modal window.
4
5*TODO: This is a raw description of the component, should be improved*
6
7**topcoder-react-utils** exports two versions of the modal component,
8`BaseModal` implements a non-themed version, and `Modal` is its version
9wrapped into a default style, using `react-css-super-themr` lib.
10
11### Props
12
13Both **BaseModal** and **Modal** components accept:
14
15| Prop | Type | Default | Description |
16| --- | --- | --- | --- |
17| children | ReactJS Node | `null` | Modal content to render.|
18| onCancel | `Function` | `noop` | Callback to trigger when the modal is closed. |
19
20**BaseModal** accepts additionally _theme_ prop, which should be an object,
21and defaults to `{}`. Theme object may have the following fields:
22
23| Field | Description |
24| --- | --- |
25| container | CSS class to apply to the **BaseModal** root container. |
26| overlay | CSS class to apply to the overlay opened behind the **BaseModal** |
27