mirror of
https://github.com/documenso/documenso.git
synced 2025-11-15 01:01:49 +10:00
🐛 doc-125 signature dialog
This commit is contained in:
@ -28,7 +28,14 @@ export default function SignatureDialog(props: any) {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Transition.Root show={props.open} as={Fragment}>
|
<Transition.Root show={props.open} as={Fragment}>
|
||||||
<Dialog as="div" className="relative z-10" onClose={props.setOpen}>
|
<Dialog
|
||||||
|
as="div"
|
||||||
|
className="relative z-10"
|
||||||
|
onClose={() => {
|
||||||
|
props.setOpen(false);
|
||||||
|
setCurrent(tabs[0]);
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Transition.Child
|
<Transition.Child
|
||||||
as={Fragment}
|
as={Fragment}
|
||||||
enter="ease-out duration-300"
|
enter="ease-out duration-300"
|
||||||
@ -105,6 +112,7 @@ export default function SignatureDialog(props: any) {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.onClose();
|
props.onClose();
|
||||||
props.setOpen(false);
|
props.setOpen(false);
|
||||||
|
setCurrent(tabs[0]);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Cancel
|
Cancel
|
||||||
@ -159,6 +167,7 @@ export default function SignatureDialog(props: any) {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.onClose();
|
props.onClose();
|
||||||
props.setOpen(false);
|
props.setOpen(false);
|
||||||
|
setCurrent(tabs[0]);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Cancel
|
Cancel
|
||||||
@ -191,11 +200,11 @@ export default function SignatureDialog(props: any) {
|
|||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
function isCurrentTab(tabName: string): boolean {
|
function isCurrentTab(tabName: string): boolean {
|
||||||
return currentTab.name === tabName;
|
return currentTab.name === tabName;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setCurrent(t: any) {
|
function setCurrent(t: any) {
|
||||||
tabs.forEach((tab) => {
|
tabs.forEach((tab) => {
|
||||||
tab.current = tab.name === t.name;
|
tab.current = tab.name === t.name;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user