-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add theme for accordion and table (#195)
Co-authored-by: bhenique <[email protected]>
- Loading branch information
1 parent
b8bbbf5
commit 6b6f712
Showing
16 changed files
with
180 additions
and
54 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
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
61 changes: 61 additions & 0 deletions
61
apps/web/src/routes/examples/[theme-rtl]/table/06-table-theme/index.tsx
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,61 @@ | ||
/** | ||
* title: Table theme | ||
* description: Use theme to customize styles of table | ||
* height: 300 | ||
*/ | ||
|
||
import { component$ } from '@builder.io/qwik' | ||
import { StaticGenerateHandler } from '@builder.io/qwik-city' | ||
import { staticGenerateHandler } from '~/routes/examples/layout' | ||
import { Link, Table } from 'flowbite-qwik' | ||
|
||
export default component$(() => { | ||
return ( | ||
<div class="overflow-x-auto"> | ||
<Table theme={{ cell: 'py-2' }}> | ||
<Table.Head> | ||
<Table.HeadCell>Product name</Table.HeadCell> | ||
<Table.HeadCell>Color</Table.HeadCell> | ||
<Table.HeadCell>Category</Table.HeadCell> | ||
<Table.HeadCell>Price</Table.HeadCell> | ||
<Table.HeadCell> | ||
<span class="sr-only">Edit</span> | ||
</Table.HeadCell> | ||
</Table.Head> | ||
<Table.Body class="divide-y"> | ||
<Table.Row class="bg-white dark:border-gray-700 dark:bg-gray-800"> | ||
<Table.Cell class="whitespace-nowrap font-medium text-gray-900 dark:text-white">{'Apple MacBook Pro 17"'}</Table.Cell> | ||
<Table.Cell>Sliver</Table.Cell> | ||
<Table.Cell>Laptop</Table.Cell> | ||
<Table.Cell>$2999</Table.Cell> | ||
<Table.Cell> | ||
<Link href="#">Edit</Link> | ||
</Table.Cell> | ||
</Table.Row> | ||
<Table.Row class="bg-white dark:border-gray-700 dark:bg-gray-800"> | ||
<Table.Cell class="whitespace-nowrap font-medium text-gray-900 dark:text-white">Microsoft Surface Pro</Table.Cell> | ||
<Table.Cell>White</Table.Cell> | ||
<Table.Cell>Laptop PC</Table.Cell> | ||
<Table.Cell>$1999</Table.Cell> | ||
<Table.Cell> | ||
<Link href="#">Edit</Link> | ||
</Table.Cell> | ||
</Table.Row> | ||
<Table.Row class="bg-white dark:border-gray-700 dark:bg-gray-800"> | ||
<Table.Cell class="whitespace-nowrap font-medium text-gray-900 dark:text-white">Magic Mouse 2</Table.Cell> | ||
<Table.Cell>Black</Table.Cell> | ||
<Table.Cell>Accessories</Table.Cell> | ||
<Table.Cell>$99</Table.Cell> | ||
<Table.Cell> | ||
<Link href="#">Edit</Link> | ||
</Table.Cell> | ||
</Table.Row> | ||
</Table.Body> | ||
</Table> | ||
</div> | ||
) | ||
}) | ||
|
||
export const onStaticGenerate: StaticGenerateHandler = async () => { | ||
return staticGenerateHandler() | ||
} |
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
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
Oops, something went wrong.