import React from 'react' import type { Meta, StoryObj } from '@storybook/react' import { Section, Table } from './index' import { getGlobalStyle } from '../../../helpers' const meta: Meta = { component: Table, title: 'organisms/Table', args: {} } export default meta type Story = StoryObj const data = [ { id: '1', name: 'John Doe Juvinao Perez Jesus David y Maria de los Angeles y los Santos Inocentes y los Pecadores ', email: '', role: 'Admin', status: true }, { id: '2', name: 'Jane Doe', email: '', role: 'User', status: false }, { id: '3', name: 'John Doe', email: '', role: 'User', status: true } ] const titles = [ { name: 'Nombre', width: '1fr', justify: 'flex-start', key: 'name' }, { name: 'Rol', width: '1fr', justify: 'flex-start', key: 'role' }, { name: 'Estado', width: '1fr', justify: 'flex-start', key: 'status' }, { name: 'Acciones', width: '1fr', justify: 'flex-start', key: 'actions' } ] export const TablePrimary: Story = { args: { entryPerView: true, renderBody: (dataB, titles) => { console.log(titles) return dataB?.map((item, index) => (
{item.name}
{item.role}
{item.role}
{item.role}
)) }, data, titles } } export const TableWithOutRows: Story = { args: { entryPerView: true, renderBody: (dataB, titles) => { console.log(titles) return dataB?.map((item, index) => (
{item.name}
{item.role}
{item.role}
{item.role}
)) }, data, titles } }