Skip to content

Commit

Permalink
feat: customize placeholder for combobox tab
Browse files Browse the repository at this point in the history
Signed-off-by: ZTL-UwU <[email protected]>
  • Loading branch information
ZTL-UwU committed Nov 10, 2024
1 parent c3932da commit e0008b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions components/content/Tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@
</UiPopoverTrigger>
<UiPopoverContent class="w-[200px] p-0">
<UiCommand>
<UiCommandInput v-if="!disableSearch" class="h-9" placeholder="Search Tab..." />
<UiCommandEmpty>No tab found.</UiCommandEmpty>
<UiCommandInput v-if="!disableSearch" class="h-9" :placeholder="searchPlaceholder" />
<UiCommandEmpty>{{ searchEmpty }}</UiCommandEmpty>
<UiCommandList>
<UiCommandGroup>
<UiCommandItem
Expand Down Expand Up @@ -184,11 +184,15 @@ const {
padded = true,
inStack = false,
disableSearch = false,
searchPlaceholder = 'Search Tab...',
searchEmpty = 'No tab found.',
} = defineProps<{
variant?: 'separate' | 'card' | 'line' | 'combobox';
padded?: boolean;
inStack?: boolean;
disableSearch?: boolean;
searchPlaceholder?: string;
searchEmpty?: string;
}>();
const activeTabIndex = ref(0);
Expand Down
4 changes: 2 additions & 2 deletions content/2.components/2.docs/tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ badges:
::code-group
::div{label="Preview" class="md:p-4"}
::tabs{variant="combobox"}
::tabs{variant="combobox" search-placeholder="Search database..." search-empty="No database found."}
::div{label="PostgreSQL"}
### PostgreSQL column types
Expand Down Expand Up @@ -219,7 +219,7 @@ badges:
::
::
```mdc [Code]
::tabs{variant="combobox"}
::tabs{variant="combobox" search-placeholder="Search database..." search-empty="No database found."}
::div{label="PostgreSQL"}
### PostgreSQL column types
Expand Down

0 comments on commit e0008b3

Please sign in to comment.