From 3ea214c863f5132a6da267897ceca7f1d059c398 Mon Sep 17 00:00:00 2001 From: Wesley Bomar Date: Wed, 13 Sep 2023 19:28:04 -0500 Subject: [PATCH] refactor: simple `TicketCreateModal` small display --- .../tickets/TicketCreateModal/TicketCreateModal.tsx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/libs/tup-components/src/tickets/TicketCreateModal/TicketCreateModal.tsx b/libs/tup-components/src/tickets/TicketCreateModal/TicketCreateModal.tsx index ccb5d5c7e..11a89b0b6 100644 --- a/libs/tup-components/src/tickets/TicketCreateModal/TicketCreateModal.tsx +++ b/libs/tup-components/src/tickets/TicketCreateModal/TicketCreateModal.tsx @@ -14,15 +14,9 @@ const TicketCreateModal: React.FC< setIsOpen(!isOpen); }; - interface SecondaryButton { - type: 'secondary'; - size?: 'small' | undefined; - } - interface LinkButton { - type: 'link'; - size: undefined; - } - const buttonAttrs: SecondaryButton | LinkButton = + const buttonAttrs: + | { type: 'secondary'; size?: 'small' | undefined } + | { type: 'link'; size: undefined } = display === 'secondary-small' ? { type: 'secondary', size: 'small' } : { type: 'link', size: undefined };