dev: hotfix
- chore, .gitignore - feat, ok button for my-ui/nav-footer
This commit is contained in:
@@ -23,4 +23,6 @@ logs
|
|||||||
.env.*
|
.env.*
|
||||||
!.env.example
|
!.env.example
|
||||||
|
|
||||||
|
# editor
|
||||||
.vscode
|
.vscode
|
||||||
|
*.swp
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
const props = defineProps<{
|
||||||
|
smallMode?: boolean
|
||||||
|
defaultClass?: string
|
||||||
|
class?: string
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const defaultClass = props.defaultClass ?? 'm-2 flex gap-2 px-2'
|
||||||
|
const additionalClass = props.class ?? ''
|
||||||
|
const btnClass = props.smallMode ? '[&_button]:w-7 [&_button]:h-7 [&_button]:2xl:w-8 [&_button]:2xl:h-9 [&_button]:!p-0' : ''
|
||||||
|
|
||||||
|
type ClickType = 'ok'
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
(e: 'click', type: ClickType): void
|
||||||
|
}>()
|
||||||
|
|
||||||
|
function onClick(type: ClickType) {
|
||||||
|
emit('click', type)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div :class="`${defaultClass} ${additionalClass} ${btnClass}`">
|
||||||
|
<div>
|
||||||
|
<Button type="button" @click="onClick('ok')">
|
||||||
|
<Icon name="i-lucide-x" />
|
||||||
|
OK
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
Reference in New Issue
Block a user