This commit is contained in:
Jeremy Rangel
2025-01-15 02:06:22 -08:00
commit 7df4855b60
20 changed files with 22169 additions and 0 deletions

View File

@ -0,0 +1,35 @@
/**
* React hook that is used to mark the block wrapper element.
* It provides all the necessary props like the class name.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops
*/
import { useBlockProps } from '@wordpress/block-editor';
/**
* The save function defines the way in which the different attributes should
* be combined into the final markup, which is then serialized by the block
* editor into `post_content`.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#save
*
* @return {Element} Element to render.
*/
export default function save({ attributes }) {
const {
chartHeight,
backgroundColor,
} = attributes;
return (
<div { ...useBlockProps.save() }>
<div
className="lcp-bar-graph"
style={{
height: chartHeight,
backgroundColor: backgroundColor,
}}
/>
</div>
);
}