diff --git a/.changeset/moody-singers-deny.md b/.changeset/moody-singers-deny.md deleted file mode 100644 index 28072baf4b..0000000000 --- a/.changeset/moody-singers-deny.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/ui': patch ---- - -Enable tooltips on disabled buttons with automatic wrapper diff --git a/packages/ui/src/components/Button/Button.stories.tsx b/packages/ui/src/components/Button/Button.stories.tsx index 1604c04eb4..db8e999f98 100644 --- a/packages/ui/src/components/Button/Button.stories.tsx +++ b/packages/ui/src/components/Button/Button.stories.tsx @@ -19,7 +19,6 @@ import { Button } from './Button'; import { Flex } from '../Flex'; import { Text } from '../Text'; import { Icon } from '../Icon'; -import { Tooltip, TooltipTrigger } from '../Tooltip'; const meta = { title: 'Backstage UI/Button', @@ -217,12 +216,3 @@ export const Playground: Story = { ), }; - -export const DisabledWithTooltips: Story = { - render: () => ( - - - Why this is disabled - - ), -}; diff --git a/packages/ui/src/components/Button/Button.tsx b/packages/ui/src/components/Button/Button.tsx index 9f658fd00a..40879e51ed 100644 --- a/packages/ui/src/components/Button/Button.tsx +++ b/packages/ui/src/components/Button/Button.tsx @@ -16,7 +16,7 @@ import clsx from 'clsx'; import { forwardRef, Ref } from 'react'; -import { Button as RAButton, Focusable } from 'react-aria-components'; +import { Button as RAButton } from 'react-aria-components'; import type { ButtonProps } from './types'; import { useStyles } from '../../hooks/useStyles'; @@ -30,7 +30,6 @@ export const Button = forwardRef( iconEnd, children, className, - isDisabled, ...rest } = props; @@ -39,29 +38,18 @@ export const Button = forwardRef( variant, }); - const btn = ( + return ( {iconStart} {children} {iconEnd} ); - - return isDisabled ? ( - - - {btn} - - - ) : ( - btn - ); }, );