Skip to content

Commit

Permalink
feat(DataTable): add CSS Variables
Browse files Browse the repository at this point in the history
  • Loading branch information
gravitano committed Nov 22, 2022
1 parent 5770f65 commit 8e45c5c
Show file tree
Hide file tree
Showing 3 changed files with 241 additions and 81 deletions.
38 changes: 32 additions & 6 deletions packages/table/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GITS Table Component
# DataTable

> Reusable Table Component
DataTable component.

## Installation

Expand All @@ -19,24 +19,50 @@ yarn add @gits-id/table
pnpm

```
pnpm i @gits-id/table
pnpm add @gits-id/table
```

## Usage

```vue
<script setup lang="ts">
import Table from '@gits-id/table';
import VDataTable from '@gits-id/table';
import '@gits-id/table/dist/style.css';
const states = ['active', 'inactive'];
const items = [...Array(30)].map((_, index) => ({
index,
name: `User-${index}`,
email: `user-${index}@example.com`,
age: index + 1 * 10,
state: states[Math.floor(Math.random() * states.length)],
}));
const headers = [
{
value: 'index',
text: 'No.',
},
{
value: 'name',
text: 'Name',
},
{
value: 'email',
text: 'Email',
},
];
</script>
<template>
<Table />
<VDataTable :items="items" :headers="headers" />
</template>
```

## Documentation

View `Table` documentation [here](https://gits-ui.web.app/?path=/story/components-table--default).
View full documentation [here](https://gits-ui.web.app/?path=/story/components-table--default).

## License

Expand Down
4 changes: 0 additions & 4 deletions packages/table/src/VDataTable.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ export default {
itemsPerPage: 10,
items,
headers,
striped: false,
hover: false,
dense: false,
loading: false,
},
} as Meta;

Expand Down
Loading

0 comments on commit 8e45c5c

Please sign in to comment.