woodpecker/web/src/components/atomic/IconButton.vue
Anbraten 58838f225c
Rewrite of WebUI (#245)
Rewrite of the UI using Typescript, Vue3, Windicss and Vite. The design should  be close to the current one with some changes:
- latest pipeline in a sidebar on the right
- secrets and registry as part of the repo-settings (secrets and registry entries shouldn't be used as much so they can be "hidden" under settings IMO)
- start page shows list of active repositories with button to enable / add new ones (currently you see all repositories and in most cases you only add new repositories once in a while)
2021-11-03 17:40:31 +01:00

61 lines
1.1 KiB
Vue

<template>
<Button
:disabled="disabled"
:is-loading="isLoading"
:to="to"
class="
flex
items-center
justify-center
text-gray-500
px-1
py-1
rounded-full
!bg-transparent
!hover:bg-gray-200
!dark:hover:bg-gray-600
hover:text-gray-700
dark:text-gray-500 dark:hover:text-gray-700
shadow-none
border-none
"
>
<Icon :name="icon" />
</Button>
</template>
<script lang="ts">
import { defineComponent, PropType } from 'vue';
import { RouteLocationRaw } from 'vue-router';
import Button from '~/components/atomic/Button.vue';
import Icon, { IconNames } from '~/components/atomic/Icon.vue';
export default defineComponent({
name: 'IconButton',
components: { Button, Icon },
props: {
icon: {
type: String as PropType<IconNames>,
required: true,
},
disabled: {
type: Boolean,
required: false,
},
to: {
type: [String, Object, null] as PropType<RouteLocationRaw | null>,
default: null,
},
isLoading: {
type: Boolean,
},
},
});
</script>