doc: complemented docs
This commit is contained in:
@@ -18,29 +18,53 @@ Use this example to basic accordion.
|
|||||||
```vue
|
```vue
|
||||||
<script setup>
|
<script setup>
|
||||||
import { Accordion } from 'flowbite'
|
import { Accordion } from 'flowbite'
|
||||||
import { ref } from 'vue'
|
import AccordionPanel from '@/components/Accordion/AccordionPanel.vue'
|
||||||
|
import AccordionHeader from '@/components/Accordion/AccordionHeader.vue'
|
||||||
|
import AccordionContent from '@/components/Accordion/AccordionContent.vue'
|
||||||
|
|
||||||
const items = ref([
|
|
||||||
{ header: 'header' },
|
|
||||||
{ header: 'another header' },
|
|
||||||
{ header: 'and one more header' },
|
|
||||||
])
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Accordion :items="items">
|
<Accordion>
|
||||||
<div>
|
<accordion-panel>
|
||||||
<p class="mb-2 text-gray-500 dark:text-gray-400">Flowbite is an open-source library of interactive components built on top of Tailwind CSS including buttons, dropdowns, modals, navbars, and more.</p>
|
<template #header>
|
||||||
<p class="text-gray-500 dark:text-gray-400">Check out this guide to learn how to <a href="/docs/getting-started/introduction/" class="text-blue-600 dark:text-blue-500 hover:underline">get started</a> and start developing websites even faster with components on top of Tailwind CSS.</p>
|
<accordion-header>header</accordion-header>
|
||||||
</div>
|
</template>
|
||||||
<div>
|
<template #content>
|
||||||
<p class="mb-2 text-gray-500 dark:text-gray-400">Flowbite is first conceptualized and designed using the Figma software so everything you see in the library has a design equivalent in our Figma file.</p>
|
<accordion-content>
|
||||||
<p class="text-gray-500 dark:text-gray-400">Check out the <a href="https://flowbite.com/figma/" class="text-blue-600 dark:text-blue-500 hover:underline">Figma design system</a> based on the utility classes from Tailwind CSS and components from Flowbite.</p>
|
<div>
|
||||||
</div>
|
<p class="mb-2 text-gray-500 dark:text-gray-400">Flowbite is an open-source library of interactive components built on top of Tailwind CSS including buttons, dropdowns, modals, navbars, and more.</p>
|
||||||
<div>
|
<p class="text-gray-500 dark:text-gray-400">Check out this guide to learn how to <a href="/docs/getting-started/introduction/" class="text-blue-600 dark:text-blue-500 hover:underline">get started</a> and start developing websites even faster with components on top of Tailwind CSS.</p>
|
||||||
<p class="mb-2 text-gray-500 dark:text-gray-400">Flowbite is first conceptualized and designed using the Figma software so everything you see in the library has a design equivalent in our Figma file.</p>
|
</div>
|
||||||
<p class="text-gray-500 dark:text-gray-400">Check out the <a href="https://flowbite.com/figma/" class="text-blue-600 dark:text-blue-500 hover:underline">Figma design system</a> based on the utility classes from Tailwind CSS and components from Flowbite.</p>
|
</accordion-content>
|
||||||
</div>
|
</template>
|
||||||
|
</accordion-panel>
|
||||||
|
<accordion-panel>
|
||||||
|
<template #header>
|
||||||
|
<accordion-header>another header</accordion-header>
|
||||||
|
</template>
|
||||||
|
<template #content>
|
||||||
|
<accordion-content>
|
||||||
|
<div>
|
||||||
|
<p class="mb-2 text-gray-500 dark:text-gray-400">Flowbite is first conceptualized and designed using the Figma software so everything you see in the library has a design equivalent in our Figma file.</p>
|
||||||
|
<p class="text-gray-500 dark:text-gray-400">Check out the <a href="https://flowbite.com/figma/" class="text-blue-600 dark:text-blue-500 hover:underline">Figma design system</a> based on the utility classes from Tailwind CSS and components from Flowbite.</p>
|
||||||
|
</div>
|
||||||
|
</accordion-content>
|
||||||
|
</template>
|
||||||
|
</accordion-panel>
|
||||||
|
<accordion-panel>
|
||||||
|
<template #header>
|
||||||
|
<accordion-header>and one more header</accordion-header>
|
||||||
|
</template>
|
||||||
|
<template #content>
|
||||||
|
<accordion-content>
|
||||||
|
<div>
|
||||||
|
<p class="mb-2 text-gray-500 dark:text-gray-400">Flowbite is first conceptualized and designed using the Figma software so everything you see in the library has a design equivalent in our Figma file.</p>
|
||||||
|
<p class="text-gray-500 dark:text-gray-400">Check out the <a href="https://flowbite.com/figma/" class="text-blue-600 dark:text-blue-500 hover:underline">Figma design system</a> based on the utility classes from Tailwind CSS and components from Flowbite.</p>
|
||||||
|
</div>
|
||||||
|
</accordion-content>
|
||||||
|
</template>
|
||||||
|
</accordion-panel>
|
||||||
</Accordion>
|
</Accordion>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -167,7 +191,7 @@ import AccordionContent from '@/components/Accordion/AccordionContent.vue'
|
|||||||
<AccordionFlushExample />
|
<AccordionFlushExample />
|
||||||
|
|
||||||
## Styling accordion
|
## Styling accordion
|
||||||
You can style headers with `header-classes` prop and content containers with `content-classes` props by pass tailwind classes.
|
You can style accordion content and headers by passing tailwind classes into them.
|
||||||
```vue
|
```vue
|
||||||
<script setup>
|
<script setup>
|
||||||
import { Accordion } from 'flowbite'
|
import { Accordion } from 'flowbite'
|
||||||
|
|||||||
Reference in New Issue
Block a user