Skip to content

Commit a848227

Browse files
authored
Merge pull request #43 from bootwindt/create-default-component
Create component and example to use it (Btn, Chip, Dropdown)
2 parents d2ec00c + f84a36d commit a848227

File tree

20 files changed

+1406
-214
lines changed

20 files changed

+1406
-214
lines changed

example/package-lock.json

Lines changed: 1199 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@
99
"preview": "vite preview"
1010
},
1111
"dependencies": {
12+
"@headlessui/vue": "^1.7.16",
13+
"bootwind": "^0.0.12",
1214
"vue": "^3.3.4"
1315
},
1416
"devDependencies": {
1517
"@vitejs/plugin-vue": "^4.2.3",
18+
"tailwindcss": "^3.3.3",
1619
"vite": "^4.4.5"
1720
}
1821
}

example/src/App.vue

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,13 @@
1-
<script setup>
2-
import HelloWorld from './components/HelloWorld.vue'
3-
</script>
41

52
<template>
6-
<div>
7-
<a href="https://vitejs.dev" target="_blank">
8-
<img src="/vite.svg" class="logo" alt="Vite logo" />
9-
</a>
10-
<a href="https://vuejs.org/" target="_blank">
11-
<img src="./assets/vue.svg" class="logo vue" alt="Vue logo" />
12-
</a>
3+
<div class="w-screen h-screen flex items-center content-center justify-center flex-wrap gap-3">
4+
<div class="w-full p-2 text-center">Used Example</div>
5+
<Btn label="Button" />
6+
<Chip label="Chip" />
7+
<Dropdown />
138
</div>
14-
<HelloWorld msg="Vite + Vue" />
159
</template>
1610

17-
<style scoped>
18-
.logo {
19-
height: 6em;
20-
padding: 1.5em;
21-
will-change: filter;
22-
transition: filter 300ms;
23-
}
24-
.logo:hover {
25-
filter: drop-shadow(0 0 2em #646cffaa);
26-
}
27-
.logo.vue:hover {
28-
filter: drop-shadow(0 0 2em #42b883aa);
29-
}
30-
</style>
11+
<script setup>
12+
import { Btn, Chip, Dropdown } from 'bootwind'
13+
</script>

example/src/assets/vue.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

example/src/components/HelloWorld.vue

Lines changed: 0 additions & 40 deletions
This file was deleted.

example/src/style.css

Lines changed: 3 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,3 @@
1-
:root {
2-
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
3-
line-height: 1.5;
4-
font-weight: 400;
5-
6-
color-scheme: light dark;
7-
color: rgba(255, 255, 255, 0.87);
8-
background-color: #242424;
9-
10-
font-synthesis: none;
11-
text-rendering: optimizeLegibility;
12-
-webkit-font-smoothing: antialiased;
13-
-moz-osx-font-smoothing: grayscale;
14-
-webkit-text-size-adjust: 100%;
15-
}
16-
17-
a {
18-
font-weight: 500;
19-
color: #646cff;
20-
text-decoration: inherit;
21-
}
22-
a:hover {
23-
color: #535bf2;
24-
}
25-
26-
a {
27-
font-weight: 500;
28-
color: #646cff;
29-
text-decoration: inherit;
30-
}
31-
a:hover {
32-
color: #535bf2;
33-
}
34-
35-
body {
36-
margin: 0;
37-
display: flex;
38-
place-items: center;
39-
min-width: 320px;
40-
min-height: 100vh;
41-
}
42-
43-
h1 {
44-
font-size: 3.2em;
45-
line-height: 1.1;
46-
}
47-
48-
button {
49-
border-radius: 8px;
50-
border: 1px solid transparent;
51-
padding: 0.6em 1.2em;
52-
font-size: 1em;
53-
font-weight: 500;
54-
font-family: inherit;
55-
background-color: #1a1a1a;
56-
cursor: pointer;
57-
transition: border-color 0.25s;
58-
}
59-
button:hover {
60-
border-color: #646cff;
61-
}
62-
button:focus,
63-
button:focus-visible {
64-
outline: 4px auto -webkit-focus-ring-color;
65-
}
66-
67-
.card {
68-
padding: 2em;
69-
}
70-
71-
#app {
72-
max-width: 1280px;
73-
margin: 0 auto;
74-
padding: 2rem;
75-
text-align: center;
76-
}
77-
78-
@media (prefers-color-scheme: light) {
79-
:root {
80-
color: #213547;
81-
background-color: #ffffff;
82-
}
83-
a:hover {
84-
color: #747bff;
85-
}
86-
button {
87-
background-color: #f9f9f9;
88-
}
89-
}
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;

example/tailwind.config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/** @type {import('tailwindcss').Config} */
2+
export default {
3+
content: [
4+
"./node_modules/bootwind/**/*.{js,jsx,ts,tsx}",
5+
"./index.html",
6+
"./src/**/*.{vue,js,ts,jsx,tsx}",
7+
],
8+
theme: {
9+
extend: {},
10+
},
11+
plugins: [],
12+
}
13+

package-lock.json

Lines changed: 29 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
{
22
"name": "bootwind",
3-
"version": "0.0.7",
3+
"version": "0.0.12",
44
"type": "module",
55
"scripts": {
66
"dev": "vite",
77
"build": "vite build",
88
"preview": "vite preview"
99
},
1010
"dependencies": {
11+
"@headlessui/vue": "^1.7.16",
12+
"@heroicons/vue": "^2.0.18",
13+
"heroicons": "^2.0.18",
1114
"vue": "^3.3.4"
1215
},
1316
"devDependencies": {

src/index.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import Btn from '@/ui/Btn.vue'
2-
import Chip from '@/ui/Chip.vue'
3-
export {
4-
Btn,
5-
Chip
6-
}
1+
export * from './ui/Btn/Btn'
2+
export * from './ui/Chip/Chip'
3+
export * from './ui/Dropdown/Dropdown'

0 commit comments

Comments
 (0)