Skip to content

Commit

Permalink
feat: add table v2 (#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
Melisa Anabella Rossi authored Jan 18, 2024
1 parent 54c77ba commit fd9c466
Show file tree
Hide file tree
Showing 12 changed files with 665 additions and 28 deletions.
84 changes: 56 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions src/components/v2/Table/Table.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import React from 'react'
import TableContainer from './TableContainer'
import { TableContent } from './TableContent'
import { ComponentMeta, ComponentStory } from '@storybook/react'

export default {
title: 'V2/Table',
component: TableContainer
} as ComponentMeta<typeof TableContainer>

const Template: ComponentStory<typeof TableContainer> = (args) => (
<TableContainer {...args} />
)

export const Basic = Template.bind({})
Basic.args = {
children: (
<TableContent
data={[
{ column1: 'test1', column2: <span>TEST 1</span> },
{
column1: 'test2',
column2: (
<div>
TEST<strong>2</strong>
</div>
)
}
]}
activePage={1}
isLoading={false}
setPage={() => console.log('setPage')}
totalPages={2}
empty={() => null}
total={10}
hasHeaders
/>
),
tabsList: [
{ displayValue: 'Tab1', value: 'tab1' },
{ displayValue: 'Tab2', value: 'tab2' }
],
sortbyList: [],
handleSortByChange: (value: string) => console.log('sortBy', value),
sortBy: ''
}
Loading

1 comment on commit fd9c466

@vercel
Copy link

@vercel vercel bot commented on fd9c466 Jan 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

decentraland-ui – ./

decentraland-ui-git-master-decentraland1.vercel.app
decentraland-ui-decentraland1.vercel.app

Please sign in to comment.