@emanon/ema-modal
v0.4.0
Published
## Overall Used to notify a user of some information.
Downloads
52
Readme
ema-modal
Overall
Used to notify a user of some information.
Properties
| Property | Attribute | Type | Default | Description |
|--------------|--------------|-----------|---------|--------------------------------------------------|
| fixed
| fixed
| boolean
| false | Modal will be placed with fixed
position. |
| opened
| opened
| boolean
| false | Modal will be visible when true. |
| persistent
| persistent
| boolean
| false | Clicking outside of the element will not deactivate it. |
Methods
| Method | Type |
|---------|------------|
| close
| (): void
|
Events
| Event | Type | Description |
|-----------------|----------------------------------------|--------------------------------------------------|
| close
| CustomEvent<{}>
| Fires when the toast is closed. |
| request-close
| CustomEvent<{ accept: () => void; }>
| Fires when the toast want to be closed. Call the function passed to accept. |
CSS Custom Properties
| Property | Default | Description |
|--------------------------------|-------------------------|----------------------------|
| --ema-c-modal-bgColor
| "#fff" | Modal background color. |
| --ema-c-modal-duration
| "300ms" | length of transition time. |
| --ema-c-modal-height
| "calc(100% - 16px * 2)" | Modal height. |
| --ema-c-modal-maxHeight
| "auto" | Modal max height. |
| --ema-c-modal-maxWidth
| "auto" | Modal max width. |
| --ema-c-modal-overlayColor
| "#80888f" | Overlay color. |
| --ema-c-modal-overlayOpacity
| | Overlay opacity. |
| --ema-c-modal-radius
| "8px" | Modal border radius. |
| --ema-c-modal-width
| "calc(100% - 16px * 2)" | Modal width. |