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
| <script setup>
| const props = defineProps({
| active: {
| type: Boolean,
| default: false
| },
| text: {
| type: String,
| default: ""
| }
| });
| </script>
|
| <template>
| <div class="pw-button-container" :class="{'active':props.active}">
| <div class="pw-button-wrapper">
| <div class="pw-button-text">{{ text }}</div>
| </div>
| </div>
| </template>
|
| <style scoped lang="less">
| .pw-button-container {
| user-select: none;
| display: inline-block;
| border: 1px solid #4095e3;
| font-size: 14px;
| padding: 4px 16px;
| box-sizing: border-box;
| min-width: 80px;
| text-align: center;
| cursor: pointer;
| &.active {
| background: linear-gradient(to top right, #5eb0fb, #529adc,#022345, #022345);
| }
| &:active {
| background: linear-gradient(to top right, #5eb0fb, #529adc,#022345, #022345);
| }
| }
|
| </style>
|
|