import React, { FC, useState } from 'react'; import { Meta, Story } from '@storybook/react'; import { Button } from '../button/button.component'; import { Description } from '../description/description.component'; import { Divider } from '../divider/divider.component'; import { Icon } from '../icon/icon.component'; import MarkerArAnimationJson from '../lottie/resourse/marker-ar.json'; import DefaultMarkerArCard from '../lottie/resourse/marker-ar-images/MarkerAR007.png'; import ProjectCardAnimationJson from '../lottie/resourse/project.json'; import ProjectCardPlaceholder from '../lottie/resourse/project-images/Start_from_Scratch009.png'; import WorldArAnimationJson from '../lottie/resourse/world-ar.json'; import DefaultWorldArCard from '../lottie/resourse/world-ar-images/img_0.png'; import { MediaComponentPropsType, MediaContent } from '../media/media.component'; import { Tooltip } from '../tooltip/tooltip.component'; import { Wrapper } from '../wrapper/wrapper.component'; import { Card, CardPropsType } from './card.component'; export default { component: Card, title: 'GEENEE-UI/Card' } as Meta; type StoryArgsType = { [key: string]: any; } & CardPropsType & MediaComponentPropsType const CardUseCase: FC = (props: StoryArgsType) => { const [ startToPlay, setStartToPlay ] = useState(false); return ( {} } loop autoplay={ false } play={ startToPlay } playFrom={ props.playFrom } animationData={ props.animationData } style={ { width: 288, height: 288 } } /> ) } onMouseEnter={ () => { setStartToPlay(true); } } onMouseLeave={ () => { setStartToPlay(false); } } > { props.title } { props.description } ); }; // eslint-disable-next-line react/function-component-definition export const DefaultCard: Story = (props: StoryArgsType) => ( ); DefaultCard.args = { placeholder: DefaultMarkerArCard, animationData: MarkerArAnimationJson, title: 'Title', description: 'Description', playFrom: 0 }; DefaultCard.bind({}); export const WorldAr: Story = (args, context) => ( ); WorldAr.bind({}); WorldAr.args = { placeholder: DefaultWorldArCard, animationData: WorldArAnimationJson, title: 'Title', description: 'Description', playFrom: 0 }; export const ProjectCard: Story = (args, context) => ( ); ProjectCard.bind({}); ProjectCard.args = { placeholder: ProjectCardPlaceholder, animationData: ProjectCardAnimationJson, title: 'Title', description: 'Description', playFrom: 0 }; export const AllCards: Story = (args, context) => ( <> { args.children } ); AllCards.args = { children: ( ) }; AllCards.bind({}); const CardWithIcon: FC = (props: StoryArgsType) => ( ) } > { props.title } { props.description } Get Started ); export const RowCard: Story = (args, context) => ( ); RowCard.bind({}); RowCard.args = { title: 'Title', description: 'Description', iconName: 'support', row: true, frame: 'solid-default', padding: 'md', mediaBefore: false };