-
-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Data Table Components * svelte Data Table Components * vue Data Table Components * In Table Components changed props 'component' * dividers added with hairline/border, Within card added + props left * added class text-right in Demos , deleted "left" props * TS added + border in material moved to TableRow * Deleted props component from Table-related components * Added back deleted types * deleted component props in types
- Loading branch information
1 parent
85a29e9
commit 643973d
Showing
36 changed files
with
1,158 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
import React from 'react'; | ||
import { | ||
Page, | ||
Navbar, | ||
NavbarBackLink, | ||
BlockTitle, | ||
Card, | ||
Table, | ||
TableHead, | ||
TableBody, | ||
TableCell, | ||
TableRow, | ||
} from 'konsta/react'; | ||
|
||
export default function DataTablePage() { | ||
const isPreview = document.location.href.includes('examplePreview'); | ||
return ( | ||
<Page> | ||
<Navbar | ||
title="Data Table" | ||
left={!isPreview && <NavbarBackLink onClick={() => history.back()} />} | ||
/> | ||
<BlockTitle>Plain table</BlockTitle> | ||
<div className="block overflow-x-auto mt-8"> | ||
<Table> | ||
<TableHead> | ||
<TableRow header> | ||
<TableCell header>Dessert (100g serving)</TableCell> | ||
<TableCell header className="text-right"> | ||
Calories | ||
</TableCell> | ||
<TableCell header className="text-right"> | ||
Fat (g) | ||
</TableCell> | ||
<TableCell header className="text-right"> | ||
Carbs | ||
</TableCell> | ||
<TableCell header className="text-right"> | ||
Protein (g) | ||
</TableCell> | ||
</TableRow> | ||
</TableHead> | ||
<TableBody> | ||
<TableRow> | ||
<TableCell>Frozen yogurt</TableCell> | ||
<TableCell className="text-right">159</TableCell> | ||
<TableCell className="text-right">6.0</TableCell> | ||
<TableCell className="text-right">24</TableCell> | ||
<TableCell className="text-right">4.0</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>Ice cream sandwich</TableCell> | ||
<TableCell className="text-right">237</TableCell> | ||
<TableCell className="text-right">9.0</TableCell> | ||
<TableCell className="text-right">37</TableCell> | ||
<TableCell className="text-right">4.4</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>Eclair</TableCell> | ||
<TableCell className="text-right">262</TableCell> | ||
<TableCell className="text-right">16.0</TableCell> | ||
<TableCell className="text-right">24</TableCell> | ||
<TableCell className="text-right">6.0</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>Cupcake</TableCell> | ||
<TableCell className="text-right">305</TableCell> | ||
<TableCell className="text-right">3.7</TableCell> | ||
<TableCell className="text-right">67</TableCell> | ||
<TableCell className="text-right">4.3</TableCell> | ||
</TableRow> | ||
</TableBody> | ||
</Table> | ||
</div> | ||
<BlockTitle>Within card</BlockTitle> | ||
<Card className="block overflow-x-auto mt-8" contentWrap={false}> | ||
<Table> | ||
<TableHead> | ||
<TableRow header> | ||
<TableCell header>Dessert (100g serving)</TableCell> | ||
<TableCell header className="text-right"> | ||
Calories | ||
</TableCell> | ||
<TableCell header className="text-right"> | ||
Fat (g) | ||
</TableCell> | ||
<TableCell header className="text-right"> | ||
Carbs | ||
</TableCell> | ||
<TableCell header className="text-right"> | ||
Protein (g) | ||
</TableCell> | ||
</TableRow> | ||
</TableHead> | ||
<TableBody> | ||
<TableRow> | ||
<TableCell>Frozen yogurt</TableCell> | ||
<TableCell className="text-right">159</TableCell> | ||
<TableCell className="text-right">6.0</TableCell> | ||
<TableCell className="text-right">24</TableCell> | ||
<TableCell className="text-right">4.0</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>Ice cream sandwich</TableCell> | ||
<TableCell className="text-right">237</TableCell> | ||
<TableCell className="text-right">9.0</TableCell> | ||
<TableCell className="text-right">37</TableCell> | ||
<TableCell className="text-right">4.4</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>Eclair</TableCell> | ||
<TableCell className="text-right">262</TableCell> | ||
<TableCell className="text-right">16.0</TableCell> | ||
<TableCell className="text-right">24</TableCell> | ||
<TableCell className="text-right">6.0</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>Cupcake</TableCell> | ||
<TableCell className="text-right">305</TableCell> | ||
<TableCell className="text-right">3.7</TableCell> | ||
<TableCell className="text-right">67</TableCell> | ||
<TableCell className="text-right">4.3</TableCell> | ||
</TableRow> | ||
</TableBody> | ||
</Table> | ||
</Card> | ||
</Page> | ||
); | ||
} | ||
DataTablePage.displayName = 'DataTablePage'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
<script> | ||
import { | ||
Page, | ||
Navbar, | ||
NavbarBackLink, | ||
BlockTitle, | ||
Card, | ||
Table, | ||
TableHead, | ||
TableBody, | ||
TableCell, | ||
TableRow, | ||
} from 'konsta/svelte'; | ||
const isPreview = document.location.href.includes('examplePreview'); | ||
</script> | ||
<Page> | ||
<Navbar title="Data Table"> | ||
<svelte:fragment slot="left"> | ||
{#if !isPreview} | ||
<NavbarBackLink onClick={() => history.back()} /> | ||
{/if} | ||
</svelte:fragment> | ||
</Navbar> | ||
<BlockTitle>Plain table</BlockTitle> | ||
<div class="block overflow-x-auto mt-8"> | ||
<Table> | ||
<TableHead> | ||
<TableRow header> | ||
<TableCell header>Dessert (100g serving)</TableCell> | ||
<TableCell header class="text-right"> | ||
Calories | ||
</TableCell> | ||
<TableCell header class="text-right"> | ||
Fat (g) | ||
</TableCell> | ||
<TableCell header class="text-right"> | ||
Carbs | ||
</TableCell> | ||
<TableCell header class="text-right"> | ||
Protein (g) | ||
</TableCell> | ||
</TableRow> | ||
</TableHead> | ||
<TableBody> | ||
<TableRow> | ||
<TableCell>Frozen yogurt</TableCell> | ||
<TableCell class="text-right">159</TableCell> | ||
<TableCell class="text-right">6.0</TableCell> | ||
<TableCell class="text-right">24</TableCell> | ||
<TableCell class="text-right">4.0</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>Ice cream sandwich</TableCell> | ||
<TableCell class="text-right">237</TableCell> | ||
<TableCell class="text-right">9.0</TableCell> | ||
<TableCell class="text-right">37</TableCell> | ||
<TableCell class="text-right">4.4</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>Eclair</TableCell> | ||
<TableCell class="text-right">262</TableCell> | ||
<TableCell class="text-right">16.0</TableCell> | ||
<TableCell class="text-right">24</TableCell> | ||
<TableCell class="text-right">6.0</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>Cupcake</TableCell> | ||
<TableCell class="text-right">305</TableCell> | ||
<TableCell class="text-right">3.7</TableCell> | ||
<TableCell class="text-right">67</TableCell> | ||
<TableCell class="text-right">4.3</TableCell> | ||
</TableRow> | ||
</TableBody> | ||
</Table> | ||
</div> | ||
<BlockTitle>Within card</BlockTitle> | ||
<Card class="block overflow-x-auto mt-8" contentWrap={false}> | ||
<Table> | ||
<TableHead> | ||
<TableRow header> | ||
<TableCell header>Dessert (100g serving)</TableCell> | ||
<TableCell header class="text-right"> | ||
Calories | ||
</TableCell> | ||
<TableCell header class="text-right"> | ||
Fat (g) | ||
</TableCell> | ||
<TableCell header class="text-right"> | ||
Carbs | ||
</TableCell> | ||
<TableCell header class="text-right"> | ||
Protein (g) | ||
</TableCell> | ||
</TableRow> | ||
</TableHead> | ||
<TableBody> | ||
<TableRow> | ||
<TableCell>Frozen yogurt</TableCell> | ||
<TableCell class="text-right">159</TableCell> | ||
<TableCell class="text-right">6.0</TableCell> | ||
<TableCell class="text-right">24</TableCell> | ||
<TableCell class="text-right">4.0</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>Ice cream sandwich</TableCell> | ||
<TableCell class="text-right">237</TableCell> | ||
<TableCell class="text-right">9.0</TableCell> | ||
<TableCell class="text-right">37</TableCell> | ||
<TableCell class="text-right">4.4</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>Eclair</TableCell> | ||
<TableCell class="text-right">262</TableCell> | ||
<TableCell class="text-right">16.0</TableCell> | ||
<TableCell class="text-right">24</TableCell> | ||
<TableCell class="text-right">6.0</TableCell> | ||
</TableRow> | ||
<TableRow> | ||
<TableCell>Cupcake</TableCell> | ||
<TableCell class="text-right">305</TableCell> | ||
<TableCell class="text-right">3.7</TableCell> | ||
<TableCell class="text-right">67</TableCell> | ||
<TableCell class="text-right">4.3</TableCell> | ||
</TableRow> | ||
</TableBody> | ||
</Table> | ||
</Card> | ||
</Page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.