web: components: rename variables
This commit is contained in:
parent
af6128c38b
commit
1e60926dd8
@ -79,15 +79,15 @@ const Modal = styled.div`
|
||||
overflow: hidden;
|
||||
outline: 0;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
display: ${props => props.isOpen ? 'block' : 'none'};
|
||||
display: ${props => props.visible ? 'block' : 'none'};
|
||||
`;
|
||||
|
||||
const ModalDialog = props => {
|
||||
const { isOpen, headerContent, bodyContent, footerContent, onClose } = props;
|
||||
const { visible, headerContent, bodyContent, footerContent, onClose } = props;
|
||||
|
||||
return (
|
||||
<>
|
||||
<Modal isOpen={isOpen}>
|
||||
<Modal visible={visible}>
|
||||
<Dialog>
|
||||
<Content>
|
||||
<Header>
|
||||
@ -104,7 +104,7 @@ const ModalDialog = props => {
|
||||
};
|
||||
|
||||
ModalDialog.propTypes = {
|
||||
isOpen: PropTypes.bool,
|
||||
visible: PropTypes.bool,
|
||||
headerContent: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
||||
bodyContent: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
||||
footerContent: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
||||
|
@ -9,14 +9,14 @@ ModalDialog is used for displaying modal dialogs
|
||||
```js
|
||||
import { ModalDialog } from 'asc-web-components';
|
||||
|
||||
<ModalDialog isOpen={false} />
|
||||
<ModalDialog visible={false} />
|
||||
```
|
||||
|
||||
#### Properties
|
||||
|
||||
| Props | Type | Required | Values | Default | Description |
|
||||
| --------------- | ------------------------- | :------: | -------| ------- | ------------------------------------------------ |
|
||||
| `isOpen` | `bool` | | | | Display dialog or not |
|
||||
| `visible` | `bool` | | | | Display dialog or not |
|
||||
| `headerContent` | `string/element/elements` | | | | Header content |
|
||||
| `bodyContent` | `string/element/elements` | | | | Body content |
|
||||
| `footerContent` | `string/element/elements` | | | | Footer content |
|
||||
|
@ -24,7 +24,7 @@ storiesOf('Components|ModalDialog', module)
|
||||
}}
|
||||
/>
|
||||
<ModalDialog
|
||||
isOpen={value}
|
||||
visible={value}
|
||||
headerContent={"Header text"}
|
||||
bodyContent={
|
||||
<p>{"Body text"}</p>
|
||||
|
Loading…
Reference in New Issue
Block a user