import { FastFlag as FastFlagIcon } from '@transferwise/icons';
import { useState } from 'react';
import { action } from 'storybook/actions';
import Accordion from '../accordion';
import Card from '../card';
import Header from '../header';
import ListItem from '../listItem';
import Section from './Section';
export default {
component: Section,
title: 'Content/Section',
};
export const Basic = () => {
return (
<>
>
);
};
export const WithHeader = () => {
return (
<>
>
);
};
export const withAccordion = () => {
const items = [
{
id: 'Item 1',
title: 'If you have a deadline, set up your transfer early',
content:
'Most large transfers take around 2–4 working days from start to finish. So set up your transfer early if you have a deadline coming up.',
icon: ,
},
{
id: 'Item 2',
title: 'Have documents on hand to speed things up',
content:
'When you set up your transfer, we might ask for documents that show where your money comes from. Documents you might need (opens in a new tab)',
icon: ,
},
{
id: 'Item 3',
title: 'Lorem ipsum',
content:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed scelerisque velit nec ex rutrum efficitur sit amet at enim. Nam a neque magna. Nullam est urna, dignissim nec erat id, euismod aliquet nulla.',
icon: ,
},
];
return (
);
};
export const WithCards = () => {
const [expandedCardIndex, setExpandedCardIndex] = useState(null);
const handleOnCardClick = (index: number) => {
if (expandedCardIndex === index) {
setExpandedCardIndex(null);
return;
}
setExpandedCardIndex(index);
};
return (
}
isExpanded={expandedCardIndex === 0}
onClick={() => handleOnCardClick(0)}
>
Hello there!
}
isExpanded={expandedCardIndex === 1}
onClick={() => handleOnCardClick(1)}
>
Hello there!
);
};
export const WithListItems = () => {
return (
action('Item 1')} />}
/>
action('Item 2')} />}
/>
);
};