generated from sonofmagic/monorepo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathIceCom.vue
74 lines (70 loc) · 1.22 KB
/
IceCom.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<script setup lang="ts">
import { computed, useAttrs } from 'vue'
import buttonClass from './buttonClass'
defineOptions({
name: 'IceCom',
})
// const props = withDefaults(defineProps(), {})
const attrs = useAttrs()
const className = computed(() => {
// @ts-ignore
return buttonClass(attrs)
})
</script>
<template>
<button :class="className">
<slot>postcss-cva</slot>
</button>
</template>
<style scoped>
/* @meta path="./buttonClass" */
.btn {
/* @b */
font-size: 50px;
padding: 72px 120px;
border-radius: 20px;
background: #e5e7eb;
}
.btn-primary {
/* @v type="primary" */
background: blue;
color: white;
}
.btn-secondary {
/* @v type="secondary" */
background: yellow;
}
.btn-third {
/* @v type="third" */
background: red;
}
.btn-disabled {
/* @v disabled="true" */
cursor: not-allowed;
opacity: 0.15;
}
.btn-lg {
/* @v size="lg" */
font-size: 60px;
padding: 90px 150px;
border-radius: 30px;
}
.btn-md {
/* @v size="md" */
font-size: 50px;
padding: 72px 120px;
border-radius: 20px;
}
.btn-sm {
/* @v size="sm" */
font-size: 40px;
padding: 60px 100px;
border-radius: 16px;
}
.btn-xs {
/* @v size="xs" */
font-size: 30px;
padding: 50px 80px;
border-radius: 12px;
}
</style>