| 1 |
import {Button, Icon} from '@wordpress/components'; |
| 2 |
import CloseIcon from './CloseIcon'; |
| 3 |
import HeaderIcon from './HeaderIcon'; |
| 4 |
|
| 5 |
const Header = ({title, closeCallback}) => { |
| 6 |
return ( |
| 7 |
<header |
| 8 |
style={{ |
| 9 |
display: 'flex', |
| 10 |
justifyContent: 'space-between', |
| 11 |
alignItems: 'center', |
| 12 |
}} |
| 13 |
> |
| 14 |
<div |
| 15 |
style={{ |
| 16 |
display: 'flex', |
| 17 |
alignItems: 'center', |
| 18 |
gap: '10px', |
| 19 |
fontSize: '16px', |
| 20 |
fontWeight: 500, |
| 21 |
lineHeight: '16px', |
| 22 |
}} |
| 23 |
> |
| 24 |
<Icon icon={HeaderIcon} /> |
| 25 |
{title} |
| 26 |
</div> |
| 27 |
<button style={{padding: 0, height: 'auto', backgroundColor: 'transparent', border: 0, cursor: 'pointer'}} onClick={closeCallback}> |
| 28 |
<CloseIcon /> |
| 29 |
</button> |
| 30 |
</header> |
| 31 |
); |
| 32 |
}; |
| 33 |
|
| 34 |
export default Header; |
| 35 |
|