import * as React from 'react' ; import IconButton from '../IconButton' ; import styles from './Dialog.module.scss' ; import { DialogContext } from './Dialog' ; const DialogHeader = props => { const dialogContext = React . useContext ( DialogContext ) ; return ( < div className = { styles . header } > < div className = { styles . headerContent } > { props . children } < /div> < IconButton icon = { 'close' } size = { 'l' } onClick = { dialogContext . closeDialog } > < /IconButton> < /div>); } ; export default DialogHeader ;