Skip to content

Commit

Permalink
Merge branch 'main' into enhance/tup-414-help-users-view-all-tickets
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleyboar authored Sep 26, 2023
2 parents f6ff1bd + f38c8d8 commit dca5566
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import styles from './TicketCreateModal.module.css';
const TicketCreateModal: React.FC<
React.PropsWithChildren<{
display: 'secondary' | 'link';
size?: 'small';
}>
> = ({ children, display }) => {
> = ({ children, size, display }) => {
const [isOpen, setIsOpen] = useState(false);
const toggle = () => {
setIsOpen(!isOpen);
Expand All @@ -22,9 +23,17 @@ const TicketCreateModal: React.FC<

return (
<>
<Button type={display} onClick={() => toggle()}>
{children}
</Button>
{display === 'secondary' && (
<Button onClick={() => toggle()} type="secondary" size={size}>
{children}
</Button>
)}
{display === 'link' && (
<Button onClick={() => toggle()} type="link">
{children}
</Button>
)}

<Modal
isOpen={isOpen}
toggle={toggle}
Expand Down
2 changes: 1 addition & 1 deletion libs/tup-components/src/tickets/TicketsDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const TicketsDashboard: React.FC = () => {
<Link to="/tickets" className={styles['viewall-action']}>
View all Tickets
</Link>
<TicketCreateModal display="secondary">
<TicketCreateModal display="secondary" size="small">
+ New Ticket
</TicketCreateModal>
</>
Expand Down

0 comments on commit dca5566

Please sign in to comment.