Files
nimbus/resources/js/components/base/command/AppCommandDialog.vue
Mazen Touati 35b96042f0 refactor: solidify the FE codebase and improve UI consistency (#45)
* chore: add storybook

* chore: unify FE codeabse

* chore: update eslint rules

* chore: harmonize the use of "subtle" color

* chore: remove an extra sidebar rail

* refactor: make panel items more consistent

* chore: cleanups after merging new code from base

* refactor: refine composables

* fix: add lost import

* chore: make icon style consistent

* fix: don't show empty "supported" methods

* refactor: solidify select items
2026-01-25 14:30:07 +01:00

52 lines
1.3 KiB
Vue

<script setup lang="ts">
/**
* @component AppCommandDialog
* @description A command palette wrapped in a modal dialog.
*/
import {
AppDialog,
AppDialogContent,
AppDialogDescription,
AppDialogHeader,
AppDialogTitle,
} from '@/components/base/dialog';
import type { DialogRootEmits, DialogRootProps } from 'reka-ui';
import { useForwardPropsEmits } from 'reka-ui';
import AppCommand from './AppCommand.vue';
/*
* Types & Interfaces.
*/
export interface AppCommandDialogProps extends DialogRootProps {
title?: string;
description?: string;
}
/*
* Component Setup.
*/
const props = withDefaults(defineProps<AppCommandDialogProps>(), {
title: 'Command Palette',
description: 'Search for a command to run...',
});
const emits = defineEmits<DialogRootEmits>();
const forwarded = useForwardPropsEmits(props, emits);
</script>
<template>
<AppDialog v-bind="forwarded">
<AppDialogContent class="overflow-hidden p-0">
<AppDialogHeader class="sr-only">
<AppDialogTitle>{{ title }}</AppDialogTitle>
<AppDialogDescription>{{ description }}</AppDialogDescription>
</AppDialogHeader>
<AppCommand>
<slot />
</AppCommand>
</AppDialogContent>
</AppDialog>
</template>