2019-10-04 23:51:26 +05:30
|
|
|
<template>
|
2019-10-13 17:33:01 +05:30
|
|
|
<button
|
2019-10-14 02:49:28 +05:30
|
|
|
class="focus:outline-none rounded-6px"
|
2019-10-13 17:33:01 +05:30
|
|
|
:style="style"
|
|
|
|
v-bind="$attrs"
|
|
|
|
v-on="$listeners"
|
|
|
|
>
|
2019-10-04 23:51:26 +05:30
|
|
|
<slot></slot>
|
|
|
|
</button>
|
|
|
|
</template>
|
2019-10-05 01:48:10 +05:30
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: 'Button',
|
|
|
|
props: {
|
|
|
|
type: {
|
|
|
|
type: String,
|
|
|
|
default: 'secondary'
|
2019-10-14 02:49:28 +05:30
|
|
|
},
|
|
|
|
icon: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
2019-10-05 01:48:10 +05:30
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
style() {
|
|
|
|
return {
|
2019-10-14 02:49:28 +05:30
|
|
|
padding: this.icon ? '9px 15px' : '6px 24px',
|
2019-10-06 03:11:16 +05:30
|
|
|
'background-image':
|
|
|
|
this.type === 'primary'
|
2019-10-24 16:55:53 +05:30
|
|
|
? 'linear-gradient(180deg, #2C9AF1 0%, #2490EF 100%)'
|
2019-10-13 17:33:01 +05:30
|
|
|
: 'linear-gradient(180deg, #FFFFFF 0%, #F4F4F6 100%)',
|
|
|
|
'box-shadow': '0 0.5px 0 0 rgba(0,0,0,0.08)'
|
2019-10-06 03:11:16 +05:30
|
|
|
};
|
2019-10-05 01:48:10 +05:30
|
|
|
}
|
|
|
|
}
|
2019-10-06 03:11:16 +05:30
|
|
|
};
|
2019-10-05 01:48:10 +05:30
|
|
|
</script>
|