chore: improve button border radius
This commit is contained in:
@@ -1,11 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<HoppSmartLink :to="to" :blank="blank"
|
<HoppSmartLink
|
||||||
class="relative inline-flex items-center justify-center py-2 font-bold transition focus:outline-none focus-visible:bg-accentDark"
|
:to="to"
|
||||||
|
:exact="exact"
|
||||||
|
:blank="blank"
|
||||||
|
class="inline-flex items-center justify-center font-semibold transition whitespace-nowrap focus:outline-none"
|
||||||
:class="[
|
:class="[
|
||||||
color
|
color
|
||||||
? `text-${color}-800 bg-${color}-200 hover:(text-${color}-900 bg-${color}-300) focus-visible:(text-${color}-900 bg-${color}-300)`
|
? `text-${color}-800 bg-${color}-200 hover:(text-${color}-900 bg-${color}-300) focus-visible:(text-${color}-900 bg-${color}-300)`
|
||||||
: `text-accentContrast bg-accent hover:bg-accentDark focus-visible:bg-accentDark`,
|
: `text-accentContrast bg-accent hover:bg-accentDark focus-visible:bg-accentDark`,
|
||||||
label ? 'px-4' : 'px-2',
|
label ? 'px-4 py-2' : 'p-2',
|
||||||
rounded ? 'rounded-full' : 'rounded',
|
rounded ? 'rounded-full' : 'rounded',
|
||||||
{ 'opacity-75 cursor-not-allowed': disabled },
|
{ 'opacity-75 cursor-not-allowed': disabled },
|
||||||
{ 'pointer-events-none': loading },
|
{ 'pointer-events-none': loading },
|
||||||
@@ -41,13 +44,19 @@
|
|||||||
{{ label }}
|
{{ label }}
|
||||||
</div>
|
</div>
|
||||||
<div v-if="shortcut.length" class="<sm:hidden">
|
<div v-if="shortcut.length" class="<sm:hidden">
|
||||||
<kbd v-for="(key, index) in shortcut" :key="`key-${index}`"
|
<kbd
|
||||||
class="shortcut-key !bg-accentDark !border-accentLight">
|
v-for="(key, index) in shortcut"
|
||||||
|
:key="`key-${index}`"
|
||||||
|
class="shortcut-key !bg-accentDark !border-accentLight"
|
||||||
|
>
|
||||||
{{ key }}
|
{{ key }}
|
||||||
</kbd>
|
</kbd>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
<span v-if="loading" class="absolute inset-0 flex items-center justify-center">
|
<span
|
||||||
|
v-if="loading"
|
||||||
|
class="absolute inset-0 flex items-center justify-center"
|
||||||
|
>
|
||||||
<HoppSmartSpinner />
|
<HoppSmartSpinner />
|
||||||
</span>
|
</span>
|
||||||
</HoppSmartLink>
|
</HoppSmartLink>
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<HoppSmartLink :to="to" :exact="exact" :blank="blank"
|
<HoppSmartLink
|
||||||
class="inline-flex items-center justify-center py-2 font-semibold transition whitespace-nowrap focus:outline-none"
|
:to="to"
|
||||||
|
:exact="exact"
|
||||||
|
:blank="blank"
|
||||||
|
class="inline-flex items-center justify-center font-semibold transition whitespace-nowrap focus:outline-none"
|
||||||
:class="[
|
:class="[
|
||||||
color
|
color
|
||||||
? `text-${color}-500 hover:text-${color}-600 focus-visible:text-${color}-600`
|
? `text-${color}-500 hover:text-${color}-600 focus-visible:text-${color}-600`
|
||||||
: 'text-secondary hover:text-secondaryDark focus-visible:text-secondaryDark',
|
: 'text-secondary hover:text-secondaryDark focus-visible:text-secondaryDark',
|
||||||
{ 'pointer-events-none': loading },
|
{ 'pointer-events-none': loading },
|
||||||
label ? 'rounded px-4' : 'px-2',
|
label ? 'rounded px-4 py-2' : 'p-2',
|
||||||
{ 'rounded-full': rounded },
|
{ 'rounded-full': rounded },
|
||||||
{ 'opacity-75 cursor-not-allowed': disabled },
|
{ 'opacity-75 cursor-not-allowed': disabled },
|
||||||
{ 'flex-row-reverse': reverse },
|
{ 'flex-row-reverse': reverse },
|
||||||
@@ -42,7 +45,11 @@
|
|||||||
{{ label }}
|
{{ label }}
|
||||||
</div>
|
</div>
|
||||||
<div v-if="shortcut.length" class="<sm:hidden">
|
<div v-if="shortcut.length" class="<sm:hidden">
|
||||||
<kbd v-for="(key, index) in shortcut" :key="`key-${index}`" class="shortcut-key !bg-inherit">
|
<kbd
|
||||||
|
v-for="(key, index) in shortcut"
|
||||||
|
:key="`key-${index}`"
|
||||||
|
class="shortcut-key !bg-inherit"
|
||||||
|
>
|
||||||
{{ key }}
|
{{ key }}
|
||||||
</kbd>
|
</kbd>
|
||||||
</div>
|
</div>
|
||||||
@@ -52,7 +59,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { HoppSmartLink, HoppSmartSpinner } from "../smart";
|
import { HoppSmartLink, HoppSmartSpinner } from "../smart"
|
||||||
import type { Component } from "vue"
|
import type { Component } from "vue"
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -233,7 +233,6 @@ const selectTab = (id: string) => {
|
|||||||
|
|
||||||
&.vertical {
|
&.vertical {
|
||||||
@apply p-2;
|
@apply p-2;
|
||||||
@apply rounded;
|
|
||||||
@apply focus: after: hidden;
|
@apply focus: after: hidden;
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
|
|||||||
Reference in New Issue
Block a user