Skip to content

Commit 3337f5d

Browse files
authored
maintenance: minor fixes (#353)
* WIP: accordion custom classes * feature: custom classes added to accordion * Accordion documentation updated * fix: prop names fixed in the docs * fix: extra line removed * fix: ReferenceErrors in documentation build * fix: button props type name
1 parent 0a12572 commit 3337f5d

File tree

6 files changed

+62
-16
lines changed

6 files changed

+62
-16
lines changed

docs/.vitepress/config.mts renamed to docs/.vitepress/config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ function getTypography () {
9999
*/
100100
export default defineConfig({
101101
title: 'Flowbite Vue 3',
102+
description: 'Flowbite Vue is an open-source UI component library built with Vue components, Tailwind CSS utility classes and based on the Flowbite design system and components.',
102103
cleanUrls: true,
103104
head: [
104105
['link', { rel: 'icon', type: 'image/svg', href: '/assets/logo.svg' }],
@@ -136,7 +137,7 @@ export default defineConfig({
136137

137138
footer: {
138139
message: 'Released under the MIT License.',
139-
copyright: 'Copyright © 2023 Flowbite™',
140+
copyright: `Copyright © ${new Date().getFullYear()} Flowbite™`,
140141
},
141142
},
142143
})

docs/components/button-group.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
<script setup>
2+
import { defineClientComponent } from 'vitepress'
3+
24
import FwbButtonGroupExample from './buttonGroup/examples/FwbButtonGroupExample.vue'
35
import FwbButtonGroupExampleIcon from './buttonGroup/examples/FwbButtonGroupExampleIcon.vue'
4-
import FwbButtonGroupExampleDropdown from './buttonGroup/examples/FwbButtonGroupExampleDropdown.vue'
6+
7+
const FwbButtonGroupExampleDropdown = defineClientComponent(() => {
8+
return import('./buttonGroup/examples/FwbButtonGroupExampleDropdown.vue')
9+
})
510
</script>
611

712
# Vue Button Group - Flowbite
@@ -98,4 +103,4 @@ You can also mix buttons with dropdowns inside the button group.
98103
<script setup>
99104
import { FwbButtonGroup, FwbButton, FwbDropdown, FwbListGroupItem, FwbListGroup } from 'flowbite-vue'
100105
</script>
101-
```
106+
```

docs/components/dropdown.md

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,30 @@
11
<script setup>
2-
import FwbDropdownExamplePlacement from './dropdown/examples/FwbDropdownExamplePlacement.vue'
3-
import FwbDropdownExampleAlignment from './dropdown/examples/FwbDropdownExampleAlignment.vue'
4-
import FwbDropdownExampleListGroup from './dropdown/examples/FwbDropdownExampleListGroup.vue'
5-
import FwbDropdownExampleButtonColors from './dropdown/examples/FwbDropdownExampleButtonColors.vue'
6-
import FwbDropdownExampleButtonGroup from './dropdown/examples/FwbDropdownExampleButtonGroup.vue'
7-
import FwbDropdownExampleDisabled from './dropdown/examples/FwbDropdownExampleDisabled.vue'
8-
import FwbDropdownExampleTrigger from './dropdown/examples/FwbDropdownExampleTrigger.vue'
9-
import FwbDropdownExampleCloseInside from './dropdown/examples/FwbDropdownExampleCloseInside.vue'
2+
import { defineClientComponent } from 'vitepress'
3+
4+
const FwbDropdownExamplePlacement = defineClientComponent(() => {
5+
return import('./dropdown/examples/FwbDropdownExamplePlacement.vue')
6+
})
7+
const FwbDropdownExampleAlignment = defineClientComponent(() => {
8+
return import('./dropdown/examples/FwbDropdownExampleAlignment.vue')
9+
})
10+
const FwbDropdownExampleListGroup = defineClientComponent(() => {
11+
return import('./dropdown/examples/FwbDropdownExampleListGroup.vue')
12+
})
13+
const FwbDropdownExampleButtonColors = defineClientComponent(() => {
14+
return import('./dropdown/examples/FwbDropdownExampleButtonColors.vue')
15+
})
16+
const FwbDropdownExampleButtonGroup = defineClientComponent(() => {
17+
return import('./dropdown/examples/FwbDropdownExampleButtonGroup.vue')
18+
})
19+
const FwbDropdownExampleDisabled = defineClientComponent(() => {
20+
return import('./dropdown/examples/FwbDropdownExampleDisabled.vue')
21+
})
22+
const FwbDropdownExampleTrigger = defineClientComponent(() => {
23+
return import('./dropdown/examples/FwbDropdownExampleTrigger.vue')
24+
})
25+
const FwbDropdownExampleCloseInside = defineClientComponent(() => {
26+
return import('./dropdown/examples/FwbDropdownExampleCloseInside.vue')
27+
})
1028
</script>
1129

1230
# Vue Dropdown - Flowbite

docs/components/flowbiteThemable/examples/FlowbiteThemableExampleDropdown.vue

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,25 @@
3535
</div>
3636
<div class="inline-flex flex-wrap gap-2">
3737
<flowbite-themable :theme="activeTheme">
38-
<fwb-dropdown text="Dropdown">
39-
Dropdown content...
38+
<fwb-dropdown>
39+
<nav class="py-2 text-sm text-gray-700 dark:text-gray-200">
40+
<a
41+
href="#"
42+
class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
43+
>Dashboard</a>
44+
<a
45+
href="#"
46+
class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
47+
>Settings</a>
48+
<a
49+
href="#"
50+
class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
51+
>Earnings</a>
52+
<a
53+
href="#"
54+
class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
55+
>Sign out</a>
56+
</nav>
4057
</fwb-dropdown>
4158
</flowbite-themable>
4259
</div>

docs/components/flowbiteThemable/flowbiteThemable.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
<script setup>
2+
import { defineClientComponent } from 'vitepress'
3+
24
import FlowbiteThemableExampleTabs from './examples/FlowbiteThemableExampleTabs.vue'
35
import FlowbiteThemableExampleButton from './examples/FlowbiteThemableExampleButton.vue'
4-
import FlowbiteThemableExampleDropdown from './examples/FlowbiteThemableExampleDropdown.vue'
6+
7+
const FlowbiteThemableExampleDropdown = defineClientComponent(() => {
8+
return import('./examples/FlowbiteThemableExampleDropdown.vue')
9+
})
510
</script>
611

712
# Vue Themable Configuration - Flowbite

src/components/FwbButton/FwbButton.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ import type { ButtonGradient, ButtonMonochromeGradient, ButtonSize, ButtonVarian
8686
import FwbSpinner from '@/components/FwbSpinner/FwbSpinner.vue'
8787
import { useMergeClasses } from '@/composables/useMergeClasses'
8888
89-
interface IButtonProps {
89+
interface ButtonProps {
9090
class?: string | object
9191
color?: ButtonVariant
9292
gradient?: ButtonGradient | null
@@ -101,7 +101,7 @@ interface IButtonProps {
101101
href?: string
102102
tag?: string
103103
}
104-
const props = withDefaults(defineProps<IButtonProps>(), {
104+
const props = withDefaults(defineProps<ButtonProps>(), {
105105
class: '',
106106
color: 'default',
107107
gradient: null,

0 commit comments

Comments
 (0)