import './style.scss'; import classnames from 'classnames/dedupe'; import { Button, Tooltip } from '@wordpress/components'; /** * Component Class * * @param props */ export default function AlignControl(props) { const { options, value, onChange } = props; let controlsArray = ['left', 'center', 'right']; if (options === 'box') { controlsArray = [ 'top-left', 'top-center', 'top-right', ...controlsArray, 'bottom-left', 'bottom-center', 'bottom-right', ]; } return (
{controlsArray.map((align) => { const alignTitle = align .split('-') .map((word) => { return word.slice(0, 1).toUpperCase() + word.slice(1); }) .join(' '); return ( ); })}
); }