WIP: initial setup with vite and vitepress, example with button

This commit is contained in:
Alexandr
2022-06-29 19:04:55 +03:00
parent 1a578b1a95
commit 9cd65e332c
27 changed files with 2421 additions and 937 deletions

33
docs/.vitepress/config.ts Normal file
View 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(),
},
}

View File

@@ -0,0 +1,5 @@
import './tailwind.css'
import DefaultTheme from 'vitepress/theme'
export default DefaultTheme

View File

@@ -0,0 +1,4 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

View File

@@ -0,0 +1,8 @@
<template>
<Button variant="default">
Кнопка
</Button>
</template>
<script setup>
import { Button } from "../../../src/index";
</script>

View File

@@ -0,0 +1,7 @@
<script setup>
import ButtonExample from './ButtonExample.vue'
</script>
# Button
<ButtonExample />

3
docs/index.css Normal file
View File

@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

1
docs/index.md Normal file
View File

@@ -0,0 +1 @@
# Flowbite vue