import React from 'react';
import { storiesOf } from '@storybook/react';
import { CarouselComponent, CarouselItem } from './index';
import styled from 'styled-components';
// Simple card component for demos
const SimpleCard = styled.div<{ color: string }>`
background: ${props => props.color};
height: 300px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 24px;
font-weight: 600;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
`;
const Container = styled.div`
max-width: 1200px;
margin: 40px auto;
padding: 0 20px;
`;
const Title = styled.h2`
margin-bottom: 24px;
font-size: 24px;
font-weight: 600;
`;
storiesOf('Typescript Component/CarouselComponent', module)
.add('Two Cards Per Page', () => {
const colors = [
'#005C8A',
'#FF6B6B',
'#4ECDC4',
'#45B7D1',
'#96CEB4',
'#FFEAA7'
];
const items = colors.map((color, index) => (
Card {index + 1}
));
return (
Two Cards Per Page (with peek)
);
})
.add('Three Cards Per Page', () => {
const colors = [
'#005C8A',
'#FF6B6B',
'#4ECDC4',
'#45B7D1',
'#96CEB4',
'#FFEAA7',
'#DFE6E9',
'#74B9FF',
'#A29BFE'
];
const items = colors.map((color, index) => (
Card {index + 1}
));
return (
Three Cards Per Page (with peek)
);
})
.add('Minimal Example', () => {
const items = [
Card 1
,
Card 2
,
Card 3
,
Card 4
];
return (
Simple 4 Cards
);
})
.add('Without Navigation', () => {
const colors = ['#005C8A', '#FF6B6B', '#4ECDC4', '#45B7D1'];
const items = colors.map((color, index) => (
Card {index + 1}
));
return (
Scroll Only (No Arrows/Dots)
);
})
.add('Three Cards Exact Width (No Peek)', () => {
const colors = [
'#005C8A',
'#FF6B6B',
'#4ECDC4',
'#45B7D1',
'#96CEB4',
'#FFEAA7'
];
const items = colors.map((color, index) => (
Card {index + 1}
));
return (
Three Cards Per Page (exact width, no peek)
);
});