diff --git a/packages/feedback/src/screenshot/components/PenIcon.tsx b/packages/feedback/src/screenshot/components/PenIcon.tsx new file mode 100644 index 000000000000..ec50862c1dd4 --- /dev/null +++ b/packages/feedback/src/screenshot/components/PenIcon.tsx @@ -0,0 +1,31 @@ +import type { VNode, h as hType } from 'preact'; + +interface FactoryParams { + h: typeof hType; +} + +export default function PenIconFactory({ + h, // eslint-disable-line @typescript-eslint/no-unused-vars +}: FactoryParams) { + return function PenIcon(): VNode { + return ( + + + + + + ); + }; +} diff --git a/packages/feedback/src/screenshot/components/ScreenshotEditor.tsx b/packages/feedback/src/screenshot/components/ScreenshotEditor.tsx index 7cd3aa5f1747..edb626635d63 100644 --- a/packages/feedback/src/screenshot/components/ScreenshotEditor.tsx +++ b/packages/feedback/src/screenshot/components/ScreenshotEditor.tsx @@ -6,6 +6,7 @@ import { h } from 'preact'; // eslint-disable-line @typescript-eslint/no-unused- import type * as Hooks from 'preact/hooks'; import { DOCUMENT, WINDOW } from '../../constants'; import CropCornerFactory from './CropCorner'; +import PenIconFactory from './PenIcon'; import { createScreenshotInputStyles } from './ScreenshotInput.css'; import { useTakeScreenshotFactory } from './useTakeScreenshot'; @@ -72,10 +73,11 @@ export function ScreenshotEditorFactory({ options, }: FactoryParams): ComponentType { const useTakeScreenshot = useTakeScreenshotFactory({ hooks }); + const CropCorner = CropCornerFactory({ h }); + const PenIcon = PenIconFactory({ h }); return function ScreenshotEditor({ onError }: Props): VNode { const styles = hooks.useMemo(() => ({ __html: createScreenshotInputStyles(options.styleNonce).innerText }), []); - const CropCorner = CropCornerFactory({ h }); const canvasContainerRef = hooks.useRef(null); const cropContainerRef = hooks.useRef(null); @@ -393,14 +395,25 @@ export function ScreenshotEditorFactory({