New UI for home page, Still need some polishing

This commit is contained in:
Chirag Chhatrala
2022-10-06 15:45:08 +05:30
parent 5b92ac2633
commit eb6535e540
5 changed files with 309 additions and 383 deletions

View File

@@ -2,12 +2,15 @@
<button :type="nativeType" :disabled="loading" :class="`py-${sizes['p-y']} px-${sizes['p-x']}
bg-${color}-${colorShades['main']} hover:bg-${color}-${colorShades['hover']} focus:ring-${color}-${colorShades['ring']}
focus:ring-offset-${color}-${colorShades['ring-offset']} text-${colorShades['text']}
transition ease-in duration-200 text-center text-${sizes['font']} font-semibold shadow-md focus:outline-none focus:ring-2
focus:ring-offset-2 rounded-lg`"
transition ease-in duration-200 text-center text-${sizes['font']} font-semibold focus:outline-none focus:ring-2
focus:ring-offset-2 border-2 border-${colorShades['border']} rounded-full `"
class="btn" @click="$emit('click',$event)"
>
<template v-if="!loading">
<slot />
<svg v-if="arrow" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="float-right ml-2 w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25" />
</svg>
</template>
<loader v-else class="h-6 w-6 text-white mx-auto" />
</button>
@@ -20,7 +23,7 @@ export default {
props: {
color: {
type: String,
default: 'nt-blue'
default: 'normal'
},
shade: {
@@ -41,6 +44,11 @@ export default {
loading: {
type: Boolean,
default: false
},
arrow: {
type: Boolean,
default: false
}
},
@@ -52,7 +60,8 @@ export default {
hover: 'light',
ring: 'light',
'ring-offset': 'lighter',
text: 'white'
text: 'white',
border: 'nt-blue'
}
}
if (this.shade === 'lighter') {
@@ -61,7 +70,8 @@ export default {
hover: '300',
ring: '100',
'ring-offset': '50',
text: 'gray-900'
text: 'gray-900',
border: 'nt-blue'
}
}
if (this.shade === 'light') {
@@ -70,7 +80,8 @@ export default {
hover: '500',
ring: '300',
'ring-offset': '150',
text: 'white'
text: 'white',
border: 'nt-blue'
}
}
return {
@@ -78,7 +89,8 @@ export default {
hover: '700',
ring: '500',
'ring-offset': '200',
text: 'white'
text: 'nt-blue',
border: 'nt-blue'
}
},
sizes () {