| 1 |
import { selectedContent } from '@agent/icons'; |
| 2 |
import { useWorkflowStore } from '@agent/state/workflows'; |
| 3 |
import { __ } from '@wordpress/i18n'; |
| 4 |
import { close, Icon } from '@wordpress/icons'; |
| 5 |
|
| 6 |
export const PageDocument = ({ busy }) => { |
| 7 |
const { setBlock } = useWorkflowStore(); |
| 8 |
return ( |
| 9 |
<div className="flex w-fit items-center justify-start gap-1 rounded-sm border border-gray-500 bg-gray-100 p-1 text-sm text-gray-900"> |
| 10 |
<div className="flex items-center gap-1"> |
| 11 |
<Icon icon={selectedContent} /> |
| 12 |
<div>{__('Selected content', 'extendify-local')}</div> |
| 13 |
</div> |
| 14 |
<button |
| 15 |
type="button" |
| 16 |
disabled={busy} |
| 17 |
className="flex h-full items-center rounded-none border-0 bg-transparent outline-hidden ring-design-main focus:shadow-none focus:outline-hidden focus-visible:outline-design-main" |
| 18 |
onClick={() => setBlock(null)} |
| 19 |
> |
| 20 |
<Icon |
| 21 |
className="pointer-events-none fill-current leading-none" |
| 22 |
icon={close} |
| 23 |
size={18} |
| 24 |
/> |
| 25 |
<span className="sr-only">{__('Remove', 'extendify-local')}</span> |
| 26 |
</button> |
| 27 |
</div> |
| 28 |
); |
| 29 |
}; |
| 30 |
|