Skip to content

Commit

Permalink
Update Unstake Confirm modal
Browse files Browse the repository at this point in the history
  • Loading branch information
Anboias committed Nov 21, 2024
1 parent 9bc34bc commit 6571d21
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
4 changes: 4 additions & 0 deletions src/components/modal/modal.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,7 @@
padding: 0;
}
}

.noMargin {
margin: 0;
}
7 changes: 4 additions & 3 deletions src/components/modal/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,12 @@ export const ModalHeader = ({ children, tooltipText, size }: ModalHeaderProps) =

interface ModalFooterProps extends ModalSize {
children?: React.ReactNode;
noMargin?: boolean;
}

export const ModalFooter = (props: ModalFooterProps) => {
if (!props.children) return null;
return <div className={styles.modalFooter}>{props.children}</div>;
export const ModalFooter = ({ children, noMargin }: ModalFooterProps) => {
if (!children) return null;
return <div className={classNames(styles.modalFooter, { [styles.noMargin]: noMargin })}> {children}</div>;
};

export const triggerOnEnter =
Expand Down
8 changes: 4 additions & 4 deletions src/pages/dashboard/forms/confirm-unstake-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ const ConfirmUnstakeForm = (props: Props) => {
<>
<ModalHeader>{props.title}</ModalHeader>

<ModalFooter>
<ModalFooter noMargin>
<div className={styles.tokenAmountFormActions}>
<Button type="text" onClick={onClose} className={styles.cancelButton}>
<Button type="text-blue" size="sm" sm={{ size: 'lg' }} onClick={onClose} className={styles.cancelButton}>
Cancel
</Button>
<Button type="secondary" onClick={handleAction}>
Initiate Unstaking
<Button type="primary" size="sm" sm={{ size: 'lg' }} onClick={handleAction}>
Yes, Initiate Unstaking
</Button>
</div>
<UnstakeHelperText type="extended" />
Expand Down
4 changes: 0 additions & 4 deletions src/pages/dashboard/forms/forms.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,3 @@
}
}
}

.cancelButton {
margin-right: $space-lg;
}

0 comments on commit 6571d21

Please sign in to comment.