@potok/modal
Advanced tools
Comparing version 0.8.0-alpha.205155ea to 0.8.0-alpha.2ac79d5a
@@ -38,2 +38,3 @@ // @flow | ||
onClose: (e: SyntheticMouseEvent<HTMLDivElement>) => void, | ||
showCloseIcon: boolean, | ||
}; | ||
@@ -53,2 +54,4 @@ | ||
closeOnBackdropClick: true, | ||
onClose: () => {}, | ||
showCloseIcon: true, | ||
}; | ||
@@ -85,2 +88,3 @@ | ||
closeClassName, | ||
showCloseIcon, | ||
} = this.props; | ||
@@ -97,9 +101,15 @@ return ( | ||
> | ||
{ title !== '' && <Header><Title>{title}</Title></Header> } | ||
<Close onClick={onClose}> | ||
<CloseIcon | ||
primaryColor={colors.N500} | ||
className={closeClassName} | ||
/> | ||
</Close> | ||
{title !== '' && ( | ||
<Header> | ||
<Title>{title}</Title> | ||
</Header> | ||
)} | ||
{showCloseIcon && ( | ||
<Close onClick={onClose}> | ||
<CloseIcon | ||
primaryColor={colors.N500} | ||
className={closeClassName} | ||
/> | ||
</Close> | ||
)} | ||
<div>{children}</div> | ||
@@ -106,0 +116,0 @@ </Modal2> |
@@ -43,3 +43,3 @@ Modal component | ||
const Modal = require('./Modal').default; | ||
const Button = require('../../button/lib/Button').default; | ||
const Button = require('../../button/components/Button').default; | ||
const PotokThemeProvider = require('../../theme').PotokThemeProvider; | ||
@@ -46,0 +46,0 @@ const ModalGatewayProvider = require('./Modal').ModalGatewayProvider; |
{ | ||
"name": "@potok/modal", | ||
"version": "0.8.0-alpha.205155ea", | ||
"version": "0.8.0-alpha.2ac79d5a", | ||
"description": "Potok.io UI Modal component", | ||
@@ -5,0 +5,0 @@ "main": "./components/Modal.jsx", |
6974
190