From 31486f74693a87834820f6cd8c3c28606dcfe813 Mon Sep 17 00:00:00 2001 From: Nick Grato Date: Tue, 2 Apr 2024 15:54:26 -0700 Subject: [PATCH] fixing button link --- package.json | 2 +- src/components/Button/Button.tsx | 18 ++++++++++-------- src/components/Button/index.ts | 2 +- src/components/index.ts | 1 + 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 4c1185c..fc7b67b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mozilla/lilypad-ui", - "version": "2.0.2", + "version": "2.0.4", "description": "React Component UI Libray", "scripts": { "sb": "start-storybook -p 6006", diff --git a/src/components/Button/Button.tsx b/src/components/Button/Button.tsx index 3ef82fa..1c07448 100644 --- a/src/components/Button/Button.tsx +++ b/src/components/Button/Button.tsx @@ -18,6 +18,15 @@ export type ButtonCategoriesT = export type ButtonSizesT = 'small' | 'medium' | 'large'; +export type LinkComponentT = React.ComponentType<{ + href: string; + children: React.ReactNode; + className?: string; + id?: string; + onClick?: MouseEventHandler; + target?: string; +}>; + export type ButtonPropsT = { active?: boolean; id?: string; @@ -33,14 +42,7 @@ export type ButtonPropsT = { target?: string; onClick?: MouseEventHandler; classProp?: string; - LinkComponent?: React.ComponentType<{ - href: string; - children: React.ReactNode; - className?: string; - id?: string; - onClick?: MouseEventHandler; - target?: string; - }>; + LinkComponent?: LinkComponentT; }; type ButtonIconT = { diff --git a/src/components/Button/index.ts b/src/components/Button/index.ts index d2a1f84..3f4d60e 100644 --- a/src/components/Button/index.ts +++ b/src/components/Button/index.ts @@ -1,2 +1,2 @@ -export { default, type ButtonT, type ButtonCategoriesT, type ButtonSizesT } from './Button'; +export { default, type ButtonT, type ButtonCategoriesT, type ButtonSizesT, type LinkComponentT } from './Button'; diff --git a/src/components/index.ts b/src/components/index.ts index 868dbbd..b4c400e 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -7,6 +7,7 @@ export { type ButtonT, type ButtonCategoriesT, type ButtonSizesT, + type LinkComponentT, } from './Button'; export { default as Checkbox } from './Checkbox'; export { default as CopyButton } from './CopyButton';