| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <template>
- <button class="c-button" @click="$emit('click')">
- <span v-if="icon" class="icon">{{icon}}</span>
- <slot></slot>
- </button>
- </template>
- <script>
- export default {
- props: ['icon']
- }
- </script>
- <style lang="scss" scoped>
- @import '~@/style/theme.scss';
- button {
- border: none;
- outline: none;
- background: transparent;
- cursor: pointer;
- -webkit-tap-highlight-color: transparent;
- display: block;
- min-width: 120px;
- height: 40px;
- background: $theme-blue;
- color: white;
- border-radius: 8px;
- font-size: 14px;
- padding: 0 16px;
- font-weight: 600;
- &:hover {
- background: darken($theme-blue, 5);
- }
- &:active {
- background: darken($theme-blue, 10);
- }
- }
- .secondary {
- color: $theme-blue;
- background: $theme-blue-transparent;
- &:hover {
- background: darken($theme-blue-transparent, 5);
- }
- &:active {
- background: darken($theme-blue-transparent, 10);
- }
- }
- .warning {
- color: $theme-orange;
- background: $theme-orange-transparent;
- &:hover {
- background: darken($theme-orange-transparent, 5);
- }
- &:active {
- background: darken($theme-orange-transparent, 10);
- }
- }
- .error {
- color: $theme-red;
- background: $theme-red-transparent;
- &:hover {
- background: darken($theme-red-transparent, 5);
- }
- &:active {
- background: darken($theme-red-transparent, 10);
- }
- }
- </style>
|