WIP: initial setup with vite and vitepress, example with button
This commit is contained in:
33
docs/.vitepress/config.ts
Normal file
33
docs/.vitepress/config.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
function buildSidebar() {
|
||||
return [
|
||||
{
|
||||
items: [
|
||||
{ text: 'Home', link: '/' }
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Components',
|
||||
collapsible: true,
|
||||
items: [
|
||||
...getComponents(),
|
||||
],
|
||||
}]
|
||||
}
|
||||
|
||||
function getComponents() {
|
||||
return [
|
||||
{ text: 'Button', link: '/guide/button/button.md' },
|
||||
]
|
||||
}
|
||||
|
||||
/**
|
||||
* This can be used as an example
|
||||
* https://github.com/vuejs/vitepress/blob/master/docs/.vitepress/config.js
|
||||
*/
|
||||
export default {
|
||||
title: 'flowbite-vue vitepress',
|
||||
themeConfig: {
|
||||
docsDir: 'docs',
|
||||
sidebar: buildSidebar(),
|
||||
},
|
||||
}
|
||||
5
docs/.vitepress/theme/index.js
Normal file
5
docs/.vitepress/theme/index.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import './tailwind.css'
|
||||
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
|
||||
export default DefaultTheme
|
||||
4
docs/.vitepress/theme/tailwind.css
Normal file
4
docs/.vitepress/theme/tailwind.css
Normal file
@@ -0,0 +1,4 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
8
docs/guide/button/ButtonExample.vue
Normal file
8
docs/guide/button/ButtonExample.vue
Normal file
@@ -0,0 +1,8 @@
|
||||
<template>
|
||||
<Button variant="default">
|
||||
Кнопка
|
||||
</Button>
|
||||
</template>
|
||||
<script setup>
|
||||
import { Button } from "../../../src/index";
|
||||
</script>
|
||||
7
docs/guide/button/button.md
Normal file
7
docs/guide/button/button.md
Normal file
@@ -0,0 +1,7 @@
|
||||
<script setup>
|
||||
import ButtonExample from './ButtonExample.vue'
|
||||
</script>
|
||||
|
||||
# Button
|
||||
|
||||
<ButtonExample />
|
||||
3
docs/index.css
Normal file
3
docs/index.css
Normal file
@@ -0,0 +1,3 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
1
docs/index.md
Normal file
1
docs/index.md
Normal file
@@ -0,0 +1 @@
|
||||
# Flowbite vue
|
||||
Reference in New Issue
Block a user