import { h, Component } from 'preact'; import PropTypes from 'prop-types'; import { Button } from '@crayons'; import { defaultChildrenPropTypes } from '../../src/components/common-prop-types'; function getAdditionalClassNames({ size, className }) { let additionalClassNames = ''; if (size && size.length > 0 && size !== 'default') { additionalClassNames += ` crayons-modal--${size}`; } if (className && className.length > 0) { additionalClassNames += ` ${className}`; } return additionalClassNames; } export class Modal extends Component { state = { visible: true, }; render() { const { visible } = this.state; const { children, size = 'default', className, title, overlay, } = this.props; const Icon = () => ( ); return visible ? (