mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 01:15:22 +00:00
d027036985
add figma addon to storybook that allows us to link figma designed to our storybook
39 lines
748 B
TypeScript
39 lines
748 B
TypeScript
import React from "react";
|
|
import { Meta, Story } from "@storybook/react";
|
|
|
|
import TooltipWrapper from ".";
|
|
|
|
import "../../index.scss";
|
|
|
|
interface ITooltipWrapperProps {
|
|
children: string;
|
|
tipContent: string;
|
|
}
|
|
|
|
export default {
|
|
component: TooltipWrapper,
|
|
title: "Components/TooltipWrapper",
|
|
args: {
|
|
tipContent: "This is an example tooltip.",
|
|
},
|
|
argTypes: {
|
|
position: {
|
|
options: ["top", "bottom"],
|
|
control: "radio",
|
|
},
|
|
},
|
|
} as Meta;
|
|
|
|
// using line breaks to create space for top position
|
|
const Template: Story<ITooltipWrapperProps> = (props) => (
|
|
<>
|
|
<br />
|
|
<br />
|
|
<br />
|
|
<br />
|
|
<TooltipWrapper {...props}>Example text</TooltipWrapper>
|
|
</>
|
|
);
|
|
|
|
export const Default = Template.bind({});
|