| 1 |
import { BlockControls } from '@wordpress/block-editor'; |
| 2 |
import { ToolbarGroup } from '@wordpress/components'; |
| 3 |
import { __ } from '@wordpress/i18n'; |
| 4 |
import { Attributes } from '../../types'; |
| 5 |
|
| 6 |
type ToolbarProps = { attributes: Attributes }; |
| 7 |
export const ToolbarControls = ({ attributes }: ToolbarProps) => { |
| 8 |
return ( |
| 9 |
<BlockControls> |
| 10 |
<ToolbarGroup className="code-block-pro-editor"> |
| 11 |
<div |
| 12 |
style={{ |
| 13 |
display: 'flex', |
| 14 |
alignItems: 'center', |
| 15 |
justifyContent: 'center', |
| 16 |
padding: '0.25rem', |
| 17 |
}} |
| 18 |
title={__('Update in sidebar', 'code-block-pro')}> |
| 19 |
{attributes?.language} |
| 20 |
</div> |
| 21 |
</ToolbarGroup> |
| 22 |
</BlockControls> |
| 23 |
); |
| 24 |
}; |
| 25 |
|