mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-30 16:49:55 +08:00
feat(component): emoji and icon picker (#13638)
 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Icon Picker added with Emoji and Icon panels, search/filtering, recent selections, color selection, skin tone options, and smooth group navigation. - **Documentation** - Storybook example added to preview and test the Icon Picker. - **Chores** - Bumped icon library dependency to a newer minor version. - Added emoji data dependency to support the Emoji Picker. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { AffineIconRenderer } from './renderer/affine-icon';
|
||||
|
||||
export const IconRenderer = ({
|
||||
iconType,
|
||||
icon,
|
||||
}: {
|
||||
iconType: 'emoji' | 'affine-icon';
|
||||
icon: string;
|
||||
}) => {
|
||||
if (iconType === 'emoji') {
|
||||
return icon;
|
||||
}
|
||||
if (iconType === 'affine-icon') {
|
||||
return <AffineIconRenderer name={icon} />;
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
Reference in New Issue
Block a user