@@ -4,40 +4,38 @@ sidebar:
44 order : 2
55---
66
7- import { Code , Card } from ' @astrojs/starlight/components' ;
7+ import { Code , Card , LinkButton , Tabs , TabItem } from ' @astrojs/starlight/components' ;
88
99import Npm from ' @/components/npm.astro' ;
1010
1111import FlowbiteTheme from ' ./_flowbite-theme.astro' ;
1212import flowbiteThemeCode from ' ./_flowbite-theme.svelte?raw' ;
13+ import demoSchemaCode from ' ./_demo-schema.ts?raw' ;
1314
1415## Installation
1516
1617<Npm pkg = " @sjsf/form @sjsf/flowbite-theme" />
1718
18- ## Configuration
19+ ### Install Flowbite Svelte
1920
20- 1 . Use tailwindcss config
21+ <LinkButton href = " https://flowbite-svelte.com/docs/pages/quickstart" variant = ' minimal' target = " _blank" icon = " external" >
22+ Quickstart - Flowbite Svelte
23+ </LinkButton >
2124
22- ``` typescript
23- import flowbite from ' flowbite/plugin' ;
24- import { THEME_CONTENT , FLOWBITE_CONTENT , FLOWBITE_ICONS_CONTENT } from ' @sjsf/flowbite-theme/preset'
25+ ### Setup styles
2526
26- /** @type {import('tailwindcss').Config} */
27- export default {
28- content: [' ./src/**/*.{html,js,svelte,ts}' , THEME_CONTENT , FLOWBITE_CONTENT , FLOWBITE_ICONS_CONTENT ],
29- plugins: [flowbite ],
30- }
31- ```
27+ There is two ways to setup styles:
3228
33- Or with a preset
29+ 1 . Tailwind configuration
3430
3531``` typescript
36- import themePreset from ' @sjsf/flowbite-theme/preset'
32+ import flowbite from ' flowbite/plugin' ;
33+ import { THEME_CONTENT , FLOWBITE_CONTENT } from ' @sjsf/flowbite-theme/preset'
3734
3835/** @type {import('tailwindcss').Config} */
3936export default {
40- presets: [themePreset ],
37+ content: [' ./src/**/*.{html,js,svelte,ts}' , THEME_CONTENT , FLOWBITE_CONTENT ],
38+ plugins: [flowbite ],
4139}
4240```
4341
@@ -48,14 +46,21 @@ export default {
4846import flowbiteStyles from " @sjsf/flowbite-theme/styles.css?inline" ;
4947```
5048
51- ## Apply theme
49+ ## Additional widgets
50+
51+ - ` toggle `
52+
53+ ## Demo
5254
53- <Code code = { flowbiteThemeCode } lang = " svelte" />
55+ <Tabs >
56+ <TabItem label = " Form.svelte" >
57+ <Code code = { flowbiteThemeCode } lang = " svelte" />
58+ </TabItem >
59+ <TabItem label = " _demo-schema.ts" >
60+ <Code code = { demoSchemaCode } lang = " typescript" />
61+ </TabItem >
62+ </Tabs >
5463
5564<Card >
5665 <FlowbiteTheme />
5766</Card >
58-
59- ## Additional widgets
60-
61- - ` toggle `
0 commit comments