Skip to content

Commit b147a88

Browse files
committed
chore(website): Fix BadgedButton documentation
1 parent ec84800 commit b147a88

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

packages/documentation/src/components/Demos/Badge/TooltippedBadgedButton.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ export default forwardRef<HTMLButtonElement, TooltippedBadgedButtonProps>(
3333
) {
3434
const { elementProps, tooltipProps } = useTooltip({
3535
baseId: id,
36+
disabled: !tooltip,
37+
style: tooltipStyle,
3638
onClick,
3739
onBlur,
3840
onFocus,
@@ -48,11 +50,7 @@ export default forwardRef<HTMLButtonElement, TooltippedBadgedButtonProps>(
4850
<BadgedButton {...props} {...elementProps} ref={ref}>
4951
{children}
5052
</BadgedButton>
51-
<Tooltip
52-
{...tooltipProps}
53-
style={tooltipStyle}
54-
className={tooltipClassName}
55-
>
53+
<Tooltip {...tooltipProps} className={tooltipClassName}>
5654
{tooltip}
5755
</Tooltip>
5856
</>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Tooltips can also be integrated with a `Badge` to show additional information
22
about these notifications as well. Unfortunately there isn't a component
33
included in `react-md` at this time to do this, but it can easily be created
4-
using the `Tooltipped` and `BadgedButton` components.
4+
using the `useTooltip` hook and the `BadgedButton` component.

0 commit comments

Comments
 (0)