Skip to content
This repository was archived by the owner on Nov 5, 2023. It is now read-only.

Commit 31fce36

Browse files
authored
Buttons for docs (#23)
1 parent 8a2837f commit 31fce36

File tree

5 files changed

+28
-11
lines changed

5 files changed

+28
-11
lines changed

app.vue

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,18 @@ const fanItems = ref<ActionFanItem<CharacterPose>[]>([
3434
<DBtn href="https://d0rich.me" target="_blank">Link Button</DBtn>
3535
<DBtn highlight="negative-tile">Default highlight</DBtn>
3636
<DBtn highlight="list-item">List highlight</DBtn>
37-
<DBtn highlight="list-item" color-class="bg-blue-600">Custom color</DBtn>
37+
<DBtn highlight="list-item" color-class="bg-blue-600"
38+
>Custom color</DBtn
39+
>
3840
<DBtn highlight="negative-list-item">List highlight (negative)</DBtn>
41+
<DBtn no-rotate class="router-link-active">Active Link</DBtn>
42+
<DBtn
43+
no-rotate
44+
class="router-link-active"
45+
highlight="negative-list-item"
46+
>Active List Link</DBtn
47+
>
48+
<DBtn text-transform="none">No Text transform</DBtn>
3949
</div>
4050
</section>
4151
<section class="my-7">

components/d/Btn.vue

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ const props = defineProps({
2727
type: String as () => HighlightVariant,
2828
default: undefined
2929
},
30-
colorClass: [String, Object as () => Record<string, boolean>]
30+
colorClass: [String, Object as () => Record<string, boolean>],
31+
textTransform: {
32+
type: String as () => 'uppercase' | 'capitalize' | 'lowercase' | 'none',
33+
default: 'uppercase'
34+
}
3135
})
3236
3337
const currentComponent = computed(() => {
@@ -41,7 +45,10 @@ const currentComponent = computed(() => {
4145
:is="currentComponent"
4246
class="d-btn"
4347
:class="{
44-
'-rotate-6': !noRotate
48+
'-rotate-6': !noRotate,
49+
uppercase: textTransform === 'uppercase',
50+
capitalize: textTransform === 'capitalize',
51+
lowercase: textTransform === 'lowercase'
4552
}"
4653
v-bind="props"
4754
>
@@ -58,6 +65,6 @@ const currentComponent = computed(() => {
5865

5966
<style>
6067
.d-btn {
61-
@apply font-extrabold uppercase select-none relative inline-block;
68+
@apply font-extrabold select-none relative inline-block;
6269
}
6370
</style>

components/d/wrap/FocusHighlight.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,10 @@ const currentComponent = computed(() => {
235235
.d-focus-hl--exact:not(.d-focus-hl--no-passive-link)
236236
.d-focus-hl__hl--negative-list-item {
237237
opacity: 1;
238-
width: 220% !important;
239-
height: 200% !important;
240-
top: -50% !important;
241-
left: -5% !important;
238+
width: 200%;
239+
height: 130%;
240+
top: -15%;
241+
left: -5%;
242242
}
243243
244244
@keyframes hl--negative-list-item-animation {

package-lock.json

Lines changed: 2 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@d0rich/nuxt-design-system",
3-
"version": "0.5.5",
3+
"version": "0.5.6",
44
"main": "./nuxt.config.ts",
55
"description": "🖼️ Design system for d0rich's projects based on Nuxt 3 and Tailwind CSS",
66
"keywords": [

0 commit comments

Comments
 (0)