diff --git a/.changeset/seven-oranges-hunt.md b/.changeset/seven-oranges-hunt.md new file mode 100644 index 0000000000..ceea04ad72 --- /dev/null +++ b/.changeset/seven-oranges-hunt.md @@ -0,0 +1,5 @@ +--- +'@backstage/core-components': patch +--- + +Wrap up the `Link` component in a component to reset the color so that we can actually see the button text diff --git a/packages/core-components/src/components/Button/Button.tsx b/packages/core-components/src/components/Button/Button.tsx index 0fbadc4dff..f2fc9f93f9 100644 --- a/packages/core-components/src/components/Button/Button.tsx +++ b/packages/core-components/src/components/Button/Button.tsx @@ -40,8 +40,13 @@ export type ButtonProps = MaterialButtonProps & */ declare function ButtonType(props: ButtonProps): JSX.Element; +/** + * This wrapper is here to reset the color of the Link and make typescript happy. + */ +const LinkWrapper = (props: LinkProps) => ; + const ActualButton = React.forwardRef((props, ref) => ( - + )) as { (props: ButtonProps): JSX.Element }; // TODO(Rugvip): We use this as a workaround to make the exported type be a