Skip to content

Commit

Permalink
🐛 UI - Added Back Erraneous Margin Removal on UtilityButton (#1554)
Browse files Browse the repository at this point in the history
* Added back erraneous margin removal

* Added field in Tina to remove margin from utilityButton
  • Loading branch information
Harry-Ross authored Oct 19, 2023
1 parent 9268f9c commit 405e05c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .tina/__generated__/_graphql.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .tina/__generated__/_schema.json

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions components/button/utilityButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type UtilityButtonProps = {
size?: keyof typeof sizes;
noAnimate?: boolean;
uncentered?: boolean;
removeTopMargin?: boolean;
};

export const UtilityButton = ({
Expand All @@ -25,6 +26,7 @@ export const UtilityButton = ({
size,
noAnimate,
uncentered,
removeTopMargin,
}: UtilityButtonProps) => {
const baseComponent = (
<Button
Expand All @@ -33,6 +35,7 @@ export const UtilityButton = ({
"h-auto",
sizes[size ?? "medium"],
uncentered ? "" : "mx-auto max-w-full",
removeTopMargin ? "" : "mt-8",
className
)}
onClick={onClick}
Expand Down Expand Up @@ -95,5 +98,11 @@ export const utilityButtonSchema: Template = {
name: "uncentered",
required: false,
},
{
type: "boolean",
label: "Remove top margin",
name: "removeTopMargin",
required: false,
},
],
};

0 comments on commit 405e05c

Please sign in to comment.