import React, { useState } from "react"; import { useCallback } from "react"; import AttentionBox from "../AttentionBox"; import { createStoryMetaSettingsDecorator } from "../../../storybook"; import { createComponentTemplate, StoryDescription } from "vibe-storybook-components"; import DialogContentContainer from "../../DialogContentContainer/DialogContentContainer"; import { Info, Invite, ThumbsUp } from "../../Icon/Icons"; import Icon from "../../Icon/Icon"; import Search from "../../Search/Search"; import Avatar from "../../Avatar/Avatar"; import person from "./assets/person.png"; import Flex from "../../Flex/Flex"; import Favorite from "../../Icon/Icons/components/Favorite"; import AttentionBoxLink from "../AttentionBoxLink/AttentionBoxLink"; import "./AttentionBox.stories.scss"; import Button from "../../Button/Button"; const metaSettings = createStoryMetaSettingsDecorator({ component: AttentionBox, enumPropNamesArray: ["type", "iconType"], iconPropNamesArray: ["icon"], actionPropsArray: ["onClose"] }); const attentionBoxTemplate = createComponentTemplate(AttentionBox); export default { title: "Feedback/AttentionBox", component: AttentionBox, subcomponents: { AttentionBoxLink }, argTypes: metaSettings.argTypes, decorators: metaSettings.decorators }; export const Overview = { render: attentionBoxTemplate.bind({}), name: "Overview", args: { onClose: () => {}, title: "Attention box title", text: "Studies show that 100% of people who celebrate birthdays, will eventually die.", className: "monday-storybook-attention-box_box" } }; export const States = { render: () => ( ), name: "States" }; export const AttentionBoxWithLink = { render: () => { return ( /** Classname for setting a constant width to the attention box */ Get your monday.com notifications ); } }; export const Dismissable = { render: () => { const mockOnClose = useCallback(() => null, []); return (
); }, name: "Dismissable " }; export const NaturalAttentionBox = { render: () => (
Cross-Account Copier Copy boards and dashboards to another account
), name: "Natural attention box" }; export const AttentionBoxInsideADialogCombobox = { render: () => { const mockOnClose = useCallback(() => null, []); return (
Suggested people
May Kishon (UX/UI Product Designer)
Invite new board member by email
); }, name: "Attention box inside a dialog/combobox" }; export const AttentionBoxAnimation = { render: () => { const [isOpen, setOpen] = useState(false); const onClick = useCallback(() => { setOpen(true); }, []); return ( <> {isOpen && ( setOpen(false)} /> )} ); }, name: "Attention box inside a dialog/combobox" };