mirror of
https://github.com/documenso/documenso.git
synced 2025-11-18 18:51:37 +10:00
fix: position of undo signature button
This commit is contained in:
@ -166,6 +166,7 @@ export const SigningForm = ({ document, recipient, fields }: SigningFormProps) =
|
|||||||
className="h-44 w-full"
|
className="h-44 w-full"
|
||||||
defaultValue={signature ?? undefined}
|
defaultValue={signature ?? undefined}
|
||||||
clearSignatureClassName="absolute -bottom-6 -right-2 z-10 cursor-pointer"
|
clearSignatureClassName="absolute -bottom-6 -right-2 z-10 cursor-pointer"
|
||||||
|
undoSignatureClassName="absolute -top-32 -left-4 z-10 cursor-pointer"
|
||||||
onChange={(value) => {
|
onChange={(value) => {
|
||||||
setSignature(value);
|
setSignature(value);
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -17,6 +17,7 @@ export type SignaturePadProps = Omit<HTMLAttributes<HTMLCanvasElement>, 'onChang
|
|||||||
onChange?: (_signatureDataUrl: string | null) => void;
|
onChange?: (_signatureDataUrl: string | null) => void;
|
||||||
containerClassName?: string;
|
containerClassName?: string;
|
||||||
clearSignatureClassName?: string;
|
clearSignatureClassName?: string;
|
||||||
|
undoSignatureClassName?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SignaturePad = ({
|
export const SignaturePad = ({
|
||||||
@ -24,6 +25,7 @@ export const SignaturePad = ({
|
|||||||
containerClassName,
|
containerClassName,
|
||||||
defaultValue,
|
defaultValue,
|
||||||
clearSignatureClassName,
|
clearSignatureClassName,
|
||||||
|
undoSignatureClassName,
|
||||||
onChange,
|
onChange,
|
||||||
...props
|
...props
|
||||||
}: SignaturePadProps) => {
|
}: SignaturePadProps) => {
|
||||||
@ -240,7 +242,7 @@ export const SignaturePad = ({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{lines.length > 0 && (
|
{lines.length > 0 && (
|
||||||
<div className="absolute bottom-4 left-4 flex gap-2">
|
<div className={cn('absolute bottom-4 left-4 flex gap-2', undoSignatureClassName)}>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
title="undo"
|
title="undo"
|
||||||
|
|||||||
Reference in New Issue
Block a user