2022-07-18 17:07:22 +00:00
|
|
|
/**
|
|
|
|
* Retrieves the translation of text.
|
|
|
|
*
|
|
|
|
* @see https://developer.wordpress.org/block-editor/packages/packages-i18n/
|
|
|
|
*/
|
2022-07-18 18:10:26 +00:00
|
|
|
import { __ } from "@wordpress/i18n";
|
2022-07-18 17:07:22 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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/packages/packages-block-editor/#useBlockProps
|
|
|
|
*/
|
2022-07-18 18:10:26 +00:00
|
|
|
import { useBlockProps, InnerBlocks } from "@wordpress/block-editor";
|
2022-07-18 17:07:22 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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/developers/block-api/block-edit-save/#save
|
|
|
|
*
|
|
|
|
* @return {WPElement} Element to render.
|
|
|
|
*/
|
2022-07-18 18:10:26 +00:00
|
|
|
export default function save({ attributes }) {
|
2022-07-18 17:07:22 +00:00
|
|
|
return (
|
2022-07-18 18:10:26 +00:00
|
|
|
<li
|
|
|
|
{...useBlockProps.save({
|
2022-07-19 10:13:58 +00:00
|
|
|
className: "orbiter",
|
2022-07-18 18:10:26 +00:00
|
|
|
})}
|
|
|
|
>
|
2022-07-19 10:13:58 +00:00
|
|
|
<div
|
|
|
|
className="orbiter-bg"
|
|
|
|
style={{
|
|
|
|
backgroundColor: attributes.backgroundColor,
|
|
|
|
}}
|
|
|
|
/>
|
2022-07-20 08:41:30 +00:00
|
|
|
<div className="orbiter-content content-center">
|
2022-07-18 18:10:26 +00:00
|
|
|
<div className="feature">
|
|
|
|
<InnerBlocks.Content />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
2022-07-18 17:07:22 +00:00
|
|
|
);
|
|
|
|
}
|