import React from 'react' import { type Meta, type StoryObj } from '@storybook/react' import { Button } from '~components/Button' import { Heading } from '~components/Heading' import { Icon } from '~components/Icon' import { BrandMomentPositiveOutro, Informative, SkillsCoachEssentialFeedback, } from '~components/Illustration' import { LinkButton } from '~components/LinkButton' import { Text } from '~components/Text' import { Tooltip as TooltipNext, TooltipTrigger as TooltipTriggerNext } from '~components/Tooltip' import { GuidanceBlock } from '../index' import { variantsMap } from '../types' const ContentComponent = (): JSX.Element => ( <> This is the Guidance block title Mussum Ipsum, cacilds vidis litro abertis. Suco de cevadiss, é um leite divinis, ) const defaultText = { description: 'Mussum Ipsum, cacilds vidis litro abertis. Suco de cevadiss, é um leite divinis, qui tem lupuliz, matis, aguis e fermentis. Mé faiz elementum girarzis, nisi eros vermeio.', title: 'This is the Guidance block title', } const meta = { title: 'Components/GuidanceBlock', component: GuidanceBlock, args: { layout: 'default', illustration: , }, argTypes: { illustrationType: { description: 'Sets the how the width and aspect ratio will respond to the Illustration passed in.', }, illustration: { control: { type: 'radio' }, options: ['spot', 'scene'], mapping: { spot: , scene: , }, description: 'This takes a scene scene or spot element, ie: ``. This radio button implementation is a storybook only representation to toggle between the two illustration styles.', }, actionsSlot: { control: { type: 'select', }, options: [ 'Primary action', 'Primary and Secondary action', 'Action with Icon', 'Action with Tooltip', ], mapping: { 'Primary action': ( ), 'Primary and Secondary action': ( <> Secondary action ), 'Action with Icon': ( Tooltip content ), 'Action with Tooltip': ( Label Tooltip content ), }, }, content: { description: 'If you need to render custom content inside of the `GuidanceBlock` that is more than just a title and description use this prop instead of the default `text` option.', }, }, } satisfies Meta export default meta type Story = StoryObj export const Playground: Story = { args: { text: defaultText, }, parameters: { docs: { canvas: { sourceState: 'shown', }, }, }, } export const CustomContent: Story = { args: { content: , }, } export const Stacked: Story = { render: (args) => (
), args: { layout: 'stacked', content: , }, } export const SceneExample: Story = { args: { illustration: , illustrationType: 'scene', text: defaultText, }, } export const Variants: Story = { render: (args) => (
{variantsMap.map((variant) => ( ))}
), args: { text: defaultText, }, } export const ActionsSlot: Story = { args: { layout: 'default', illustration: , content: , actionsSlot: ( <> ), }, render: (args) => (
), } export const MultipleActions: Story = { args: { layout: 'default', illustration: , content: , actionsSlot: ( <> Label ), }, render: (args) => (
), } export const ActionsSlotWithTooltips: Story = { args: { layout: 'default', illustration: , content: , actionsSlot: ( <> Tooltip Content Label Tooltip secondary content ), }, render: (args) => (
), }