diff --git a/src/Widgets/TextAlign.jsx b/src/Widgets/TextAlign.jsx index b81e6df..68920c4 100644 --- a/src/Widgets/TextAlign.jsx +++ b/src/Widgets/TextAlign.jsx @@ -8,20 +8,20 @@ import alignJustifySVG from '@plone/volto/icons/align-justify.svg'; import alignCenterSVG from '@plone/volto/icons/align-center.svg'; import clearSVG from '@plone/volto/icons/clear.svg'; -const VALUE_MAP = [ - ['left', alignLeftSVG], - ['right', alignRightSVG], - ['center', alignCenterSVG], - ['justify', alignJustifySVG], - ['', clearSVG], +export const TEXT_ALIGN_VALUE_MAP = [ + ['left', alignLeftSVG, 'Left align'], + ['right', alignRightSVG, 'Right align'], + ['center', alignCenterSVG, 'Center align'], + ['justify', alignJustifySVG, 'Justify align'], + ['', clearSVG, 'Clear selection'], ]; export default (props) => { - const { value, onChange, id, actions = VALUE_MAP } = props; + const { value, onChange, id, actions = TEXT_ALIGN_VALUE_MAP } = props; return (
- {actions.map(([name, icon], index) => ( + {actions.map(([name, icon, title], index) => ( ))}