I’m new to React and have been trying to Google a solution to this for hours – I probably just don’t know the right terminology.
I know I can create a Story for a React component by importing the component and setting it’s arguments as such:
import Button from './button';
export default {
title: 'Atoms/button',
component: Button,
parameters: {
layout: 'centered',
},
tags: ['autodocs'],
};
export const Standard = {
args: {
label: "Click me",
size: "lg"
},
};
But how do I create a story for a component that wraps HTML (or another component), eg Tippy Tooltips:
<Tooltip
title="Welcome to React"
position="bottom"
trigger="click"
>
<p>Click here to show popup</p>
</Tooltip>
How to I send <p>Click here to show popup</p>
as an arg
in Storybook?