mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
fix(ui): badge and button colors
This commit is contained in:
parent
8e6aab2c02
commit
e04d74128f
@ -5,7 +5,8 @@
|
|||||||
font-semibold
|
font-semibold
|
||||||
flex
|
flex
|
||||||
items-center
|
items-center
|
||||||
bg-gray-100
|
bg-gray-200
|
||||||
|
text-gray-700
|
||||||
px-3
|
px-3
|
||||||
rounded-md
|
rounded-md
|
||||||
"
|
"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="inline-block rounded-md px-2 py-1 truncate" :class="colorClass">
|
<div class="inline-block rounded-md px-2 py-1 truncate select-none" :class="colorClass">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -42,8 +42,8 @@ export default {
|
|||||||
'opacity-50 cursor-not-allowed pointer-events-none': this.disabled,
|
'opacity-50 cursor-not-allowed pointer-events-none': this.disabled,
|
||||||
'text-white': this.type === 'primary',
|
'text-white': this.type === 'primary',
|
||||||
'bg-blue-500': this.type === 'primary',
|
'bg-blue-500': this.type === 'primary',
|
||||||
'text-gray-900': this.type !== 'primary',
|
'text-gray-700': this.type !== 'primary',
|
||||||
'bg-gray-100': this.type !== 'primary',
|
'bg-gray-200': this.type !== 'primary',
|
||||||
'px-3': this.padding && this.icon,
|
'px-3': this.padding && this.icon,
|
||||||
'px-6': this.padding && !this.icon,
|
'px-6': this.padding && !this.icon,
|
||||||
};
|
};
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<template #target="{ togglePopover }">
|
<template #target="{ togglePopover }">
|
||||||
<Button :icon="true" @click="togglePopover()">
|
<Button :icon="true" @click="togglePopover()">
|
||||||
<span class="flex items-center">
|
<span class="flex items-center">
|
||||||
<Icon name="filter" size="12" class="stroke-current text-gray-800" />
|
<Icon name="filter" size="12" class="stroke-current text-gray-700" />
|
||||||
<span class="ml-1">
|
<span class="ml-1">
|
||||||
<template v-if="activeFilterCount > 0">
|
<template v-if="activeFilterCount > 0">
|
||||||
{{ filterAppliedMessage }}
|
{{ filterAppliedMessage }}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
:padding="false"
|
:padding="false"
|
||||||
class="px-3"
|
class="px-3"
|
||||||
>
|
>
|
||||||
<feather-icon name="plus" class="w-4 h-4 text-white" />
|
<feather-icon name="plus" class="w-4 h-4" />
|
||||||
</Button>
|
</Button>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
<List
|
<List
|
||||||
|
@ -33,7 +33,7 @@ const getValidColor = (color: string) => {
|
|||||||
|
|
||||||
export function getBgColorClass(color: string) {
|
export function getBgColorClass(color: string) {
|
||||||
const vcolor = getValidColor(color);
|
const vcolor = getValidColor(color);
|
||||||
return `bg-${vcolor}-100`;
|
return `bg-${vcolor}-200`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getColorClass(color: string, type: 'bg' | 'text', value = 300) {
|
export function getColorClass(color: string, type: 'bg' | 'text', value = 300) {
|
||||||
@ -41,7 +41,7 @@ export function getColorClass(color: string, type: 'bg' | 'text', value = 300) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getTextColorClass(color: string) {
|
export function getTextColorClass(color: string) {
|
||||||
return `text-${getValidColor(color)}-600`;
|
return `text-${getValidColor(color)}-700`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getBgTextColorClass(color: string) {
|
export function getBgTextColorClass(color: string) {
|
||||||
|
Loading…
Reference in New Issue
Block a user