diff --git a/src/components/Button/Button.tsx b/src/components/Button/Button.tsx index dd20949c8276..886a36654d38 100644 --- a/src/components/Button/Button.tsx +++ b/src/components/Button/Button.tsx @@ -1,4 +1,4 @@ -import React, { ComponentProps, FC } from "react"; +import React, { ComponentProps, FC, forwardRef } from "react"; import { styled } from "@storybook/theming"; export interface ButtonProps extends ComponentProps<"button"> { @@ -61,15 +61,13 @@ const StyledButton = styled.button<{ variant: ButtonProps["variant"] }>` } `; -export const Button: FC = ({ - children, - onClick, - variant = "primary", - ...rest -}) => { - return ( - - {children} - - ); -}; +export const Button: FC = forwardRef( + ({ children, onClick, variant = 'primary', ...rest }, ref) => { + return ( + + {children} + + ); + } +); + diff --git a/src/components/SyntaxHighlighter/SyntaxHighlighter.stories.tsx b/src/components/SyntaxHighlighter/SyntaxHighlighter.stories.tsx index d16e88fe4032..d12e6b52e807 100644 --- a/src/components/SyntaxHighlighter/SyntaxHighlighter.stories.tsx +++ b/src/components/SyntaxHighlighter/SyntaxHighlighter.stories.tsx @@ -58,8 +58,9 @@ export default meta;`, export const Warning: Story = { args: { + primary: true, + label: 'Delete now', backgroundColor: 'red', - label: 'Delete now' } };`, }, diff --git a/src/features/GuidedTour/GuidedTour.tsx b/src/features/GuidedTour/GuidedTour.tsx index 171c2b71f4e9..be860c14a370 100644 --- a/src/features/GuidedTour/GuidedTour.tsx +++ b/src/features/GuidedTour/GuidedTour.tsx @@ -34,7 +34,10 @@ export function GuidedTour({ target: "#example-button--warning", title: "Congratulations!", content: - "You just created your first story. You nailed the basics. Continue setting up your project and start writing stories for your components.", + <> + You just created your first story. You nailed the basics.
+ Continue setting up your project and start writing stories for your components. + , placement: "right", disableOverlay: true, disableBeacon: true, @@ -95,8 +98,8 @@ export function GuidedTour({ title: "Congratulations!", content: ( <> - You've learned how to control your stories interactively. Now: - let's explore how to write your first story. + You've learned how to control your stories interactively.
+ Now: let's explore how to write your first story. = ({ Welcome to Storybook - Storybook helps you develop UI components. Learn the basics in a + Storybook helps you develop UI components faster. Learn the basics in a few simple steps.