Skip to content

Commit 2ac815f

Browse files
committed
button component now has icon spacing adjustment (for lucide icons)
1 parent 13232e2 commit 2ac815f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

apps/webapp/app/components/Shortcuts.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ export function Shortcuts() {
2424
fullWidth
2525
textAlignLeft
2626
shortcut={{ modifiers: ["shift"], key: "?" }}
27+
className="gap-x-0 pl-0.5"
28+
iconSpacing="gap-x-0.5"
2729
>
2830
Shortcuts
2931
</Button>

apps/webapp/app/components/primitives/Buttons.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ export type ButtonContentPropsType = {
177177
variant: keyof typeof variant;
178178
shortcutPosition?: "before-trailing-icon" | "after-trailing-icon";
179179
tooltipDescription?: string;
180+
iconSpacing?: string;
180181
};
181182

182183
export function ButtonContent(props: ButtonContentPropsType) {
@@ -192,6 +193,7 @@ export function ButtonContent(props: ButtonContentPropsType) {
192193
className,
193194
showTooltip,
194195
tooltipDescription,
196+
iconSpacing,
195197
} = props;
196198
const variation = allVariants.variant[props.variant];
197199

@@ -216,7 +218,8 @@ export function ButtonContent(props: ButtonContentPropsType) {
216218
className={cn(
217219
textAlignLeft ? "text-left" : "justify-center",
218220
"flex w-full items-center",
219-
iconSpacingClassName
221+
iconSpacingClassName,
222+
iconSpacing
220223
)}
221224
>
222225
{LeadingIcon &&

0 commit comments

Comments
 (0)