-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit.js
More file actions
29 lines (23 loc) · 763 Bytes
/
edit.js
File metadata and controls
29 lines (23 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { html } from "../../utils";
import { useBlockProps, BlockControls, InnerBlocks } from '@wordpress/block-editor';
export default ( props ) => {
const { attributes, setAttributes } = props;
const blockProps = useBlockProps();
const mainEleProps = () => {
const p = {};
p['brand-color'] = 'red';
return p;
}
// set up color picker
const onColorChange = (value) => {
setAttributes( {brandColor: value ? value.slug : "" } );
}
return html`
<div ...${ blockProps }>
<div className="alertdiv">
<div className="divAlertIcon"><ucdlib-icon class="alertIcon" icon="ucd-public:fa-circle-exclamation"></ucdlib-icon></div>
<div className="divAlertContent"><b><${InnerBlocks} /></b></div>
</div>
</div>
`
}