diff --git a/src/components/MarkInputs/Signature.module.scss b/src/components/MarkInputs/Signature.module.scss index fe8deec..fb49bab 100644 --- a/src/components/MarkInputs/Signature.module.scss +++ b/src/components/MarkInputs/Signature.module.scss @@ -11,10 +11,10 @@ $padding: 5px; .relative { position: relative; + outline: 1px solid black; } .canvas { - outline: 1px solid black; background-color: $body-background-color; cursor: crosshair; diff --git a/src/components/MarkInputs/Signature.tsx b/src/components/MarkInputs/Signature.tsx index 641a3ab..ed0ebff 100644 --- a/src/components/MarkInputs/Signature.tsx +++ b/src/components/MarkInputs/Signature.tsx @@ -7,7 +7,7 @@ import styles from './Signature.module.scss' import { MarkRenderSignature } from '../MarkRender/Signature' import SignaturePad from 'signature_pad' import { Config, optimize } from 'svgo' -import { SIGNATURE_PAD_OPTIONS } from '../../utils/const' +import { SIGNATURE_PAD_OPTIONS, SIGNATURE_PAD_SIZE } from '../../utils/const' export const MarkInputSignature = ({ value, @@ -58,10 +58,16 @@ export const MarkInputSignature = ({ return ( <>
-
+
diff --git a/src/components/MarkRender/Signature.tsx b/src/components/MarkRender/Signature.tsx index cee90fd..1c8279f 100644 --- a/src/components/MarkRender/Signature.tsx +++ b/src/components/MarkRender/Signature.tsx @@ -1,12 +1,16 @@ import { MarkRenderProps } from '../../types/mark' +import { SIGNATURE_PAD_SIZE } from '../../utils' +import styles from './Signature.module.scss' -export const MarkRenderSignature = ({ value, mark }: MarkRenderProps) => { +export const MarkRenderSignature = ({ value }: MarkRenderProps) => { const segments: string[][] = value ? JSON.parse(value) : [] return ( {segments.map(([path, width]) => ( diff --git a/src/utils/const.ts b/src/utils/const.ts index 43aae1d..bf38404 100644 --- a/src/utils/const.ts +++ b/src/utils/const.ts @@ -117,3 +117,8 @@ export const SIGNATURE_PAD_OPTIONS = { minWidth: 0.5, maxWidth: 3 } as const + +export const SIGNATURE_PAD_SIZE = { + width: 600, + height: 300 +}