feat: add icon-picker component (#4832)

* feat: add icon-picker component

* fix: resolve conversations

* refactor: resort @vben/hooks
This commit is contained in:
huangxiaomin
2024-11-09 14:10:17 +08:00
committed by GitHub
parent 6b9acf09dc
commit 632081e828
13 changed files with 1130 additions and 3 deletions

View File

@@ -4,4 +4,9 @@ export * from './create-icon';
export * from './lucide';
export type { IconifyIcon as IconifyIconStructure } from '@iconify/vue';
export { addCollection, addIcon, Icon as IconifyIcon } from '@iconify/vue';
export {
addCollection,
addIcon,
Icon as IconifyIcon,
listIcons,
} from '@iconify/vue';

View File

@@ -27,6 +27,7 @@ export {
FoldHorizontal,
Fullscreen,
Github,
Grip,
Info,
InspectionPanel,
Languages,
@@ -40,6 +41,7 @@ export {
Minimize,
Minimize2,
MoonStar,
Package2,
Palette,
PanelLeft,
PanelRight,

View File

@@ -14,6 +14,7 @@ interface Props extends VbenButtonProps {
disabled?: boolean;
onClick?: () => void;
tooltip?: string;
tooltipDelayDuration?: number;
tooltipSide?: 'bottom' | 'left' | 'right' | 'top';
variant?: ButtonVariants;
}
@@ -21,6 +22,7 @@ interface Props extends VbenButtonProps {
const props = withDefaults(defineProps<Props>(), {
disabled: false,
onClick: () => {},
tooltipDelayDuration: 200,
tooltipSide: 'bottom',
variant: 'icon',
});
@@ -42,7 +44,11 @@ const showTooltip = computed(() => !!slots.tooltip || !!props.tooltip);
<slot></slot>
</VbenButton>
<VbenTooltip v-else :side="tooltipSide">
<VbenTooltip
v-else
:delay-duration="tooltipDelayDuration"
:side="tooltipSide"
>
<template #trigger>
<VbenButton
:class="cn('rounded-full', props.class)"