Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

styles: update modal buttons #4961

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 12 additions & 3 deletions resources/scripts/components/elements/ConfirmationModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import type { ReactNode } from 'react';
import { useContext } from 'react';
import tw from 'twin.macro';

import Button from '@/components/elements/Button';
import { Button } from '@/components/elements/button/index';
import ModalContext from '@/context/ModalContext';
import asModal from '@/hoc/asModal';
import { Variant } from './button/types';
alexevladgabriel marked this conversation as resolved.
Show resolved Hide resolved

interface Props {
children: ReactNode;
Expand All @@ -24,10 +25,18 @@ function ConfirmationModal({ title, children, buttonText, onConfirmed }: Props)
<div css={tw`text-neutral-300`}>{children}</div>

<div css={tw`flex flex-wrap items-center justify-end mt-8`}>
<Button isSecondary onClick={() => dismiss()} css={tw`w-full sm:w-auto border-transparent`}>
<Button
variant={Variant.Secondary}
onClick={() => dismiss()}
css={tw`w-full sm:w-auto border-transparent`}
>
Cancel
</Button>
<Button color={'red'} css={tw`w-full sm:w-auto mt-4 sm:mt-0 sm:ml-4`} onClick={() => onConfirmed()}>
<Button
variant={Variant.Danger}
css={tw`w-full sm:w-auto mt-4 sm:mt-0 sm:ml-4`}
onClick={() => onConfirmed()}
>
{buttonText}
</Button>
</div>
Expand Down