import { Meta, StoryObj } from '@storybook/react'
import React from 'react'
import StoryWrapper from '../../utils/story-wrapper.jsx'
import { Button, CheckBox, Icon, Link, Text } from '../index.js'
import { Table, TableBody, TableCaption, TableCell, TableHead, TableRow } from './index.js'
export const Default: StoryObj<{ onClick: (e) => void }> = {
render: ({ onClick }) => {
const handleClick = (event) => {
event.preventDefault()
onClick(event)
}
const header = ['Name', 'Surname', 'Gender', 'Age']
const data = [
['John', 'Doe', 'Male', '57'],
['Joanna', 'K', 'Female', '32'],
['Patrick', 'Jogs', 'Male', '35'],
['Elisabeth', 'Briggs', 'Female', '28'],
['Jda', 'Karo', 'Female', '22'],
]
return (
Selected items
{header.map((head, i) => (
{head}
{i === 0 && }
))}
{data.map((row) => (
{row.map((item) => (
{item}
))}
))}
)
},
}
const meta: Meta = {
title: 'DesignSystem/Atoms/Table',
component: Table,
argTypes: {
onClick: { action: 'clicked' },
},
}
export default meta