PluginProbe ʕ •ᴥ•ʔ
GenerateBlocks / 2.0.2
GenerateBlocks v2.0.2
trunk 1.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.7.0 1.7.1 1.7.2 1.7.3 1.8.0 1.8.1 1.8.2 1.8.3 1.9.0 1.9.1 2.0.0 2.0.1 2.0.2 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.3.0
generateblocks / src / components / notice-panel / NoticePanel.jsx
generateblocks / src / components / notice-panel Last commit date
NoticePanel.jsx 1 year ago editor.scss 1 year ago
NoticePanel.jsx
29 lines
1 import { Button, PanelBody } from '@wordpress/components';
2 import { closeSmall } from '@wordpress/icons';
3 import { __ } from '@wordpress/i18n';
4
5 import './editor.scss';
6
7 export function NoticePanel( { children, title, onDismiss } ) {
8 return (
9 <PanelBody
10 className="gb-notice-panel"
11 >
12 <div className="gb-notice-panel__header">
13 <h2>{ title }</h2>
14 { !! onDismiss && (
15 <Button
16 className="gb-notice-panel__dismiss"
17 onClick={ onDismiss }
18 icon={ closeSmall }
19 size="small"
20 label={ __( 'Dismiss', 'generateblocks' ) }
21 showTooltip
22 />
23 ) }
24 </div>
25 { children }
26 </PanelBody>
27 );
28 }
29