Skip to content

Commit 31486f7

Browse files
author
Nick Grato
committed
fixing button link
1 parent dfce8c0 commit 31486f7

4 files changed

Lines changed: 13 additions & 10 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mozilla/lilypad-ui",
3-
"version": "2.0.2",
3+
"version": "2.0.4",
44
"description": "React Component UI Libray",
55
"scripts": {
66
"sb": "start-storybook -p 6006",

src/components/Button/Button.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ export type ButtonCategoriesT =
1818

1919
export type ButtonSizesT = 'small' | 'medium' | 'large';
2020

21+
export type LinkComponentT = React.ComponentType<{
22+
href: string;
23+
children: React.ReactNode;
24+
className?: string;
25+
id?: string;
26+
onClick?: MouseEventHandler<HTMLAnchorElement>;
27+
target?: string;
28+
}>;
29+
2130
export type ButtonPropsT = {
2231
active?: boolean;
2332
id?: string;
@@ -33,14 +42,7 @@ export type ButtonPropsT = {
3342
target?: string;
3443
onClick?: MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;
3544
classProp?: string;
36-
LinkComponent?: React.ComponentType<{
37-
href: string;
38-
children: React.ReactNode;
39-
className?: string;
40-
id?: string;
41-
onClick?: MouseEventHandler<HTMLAnchorElement>;
42-
target?: string;
43-
}>;
45+
LinkComponent?: LinkComponentT;
4446
};
4547

4648
type ButtonIconT = {

src/components/Button/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export { default, type ButtonT, type ButtonCategoriesT, type ButtonSizesT } from './Button';
1+
export { default, type ButtonT, type ButtonCategoriesT, type ButtonSizesT, type LinkComponentT } from './Button';
22

src/components/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export {
77
type ButtonT,
88
type ButtonCategoriesT,
99
type ButtonSizesT,
10+
type LinkComponentT,
1011
} from './Button';
1112
export { default as Checkbox } from './Checkbox';
1213
export { default as CopyButton } from './CopyButton';

0 commit comments

Comments
 (0)