feat(core): readwise integration tags setting (#10946)

close AF-2307, AF-2262
This commit is contained in:
CatsJuice
2025-03-20 23:20:58 +00:00
parent f1c8a88a7c
commit e37328c83b
9 changed files with 185 additions and 8 deletions
@@ -27,10 +27,12 @@ export interface TagsEditorProps {
}
export interface TagsInlineEditorProps extends TagsEditorProps {
placeholder?: string;
placeholder?: ReactNode;
className?: string;
readonly?: boolean;
title?: ReactNode; // only used for mobile
modalMenu?: boolean;
menuClassName?: string;
}
type TagOption = TagLike | { readonly create: true; readonly value: string };
@@ -364,6 +366,8 @@ const DesktopTagsInlineEditor = ({
readonly,
placeholder,
className,
modalMenu,
menuClassName,
...props
}: TagsInlineEditorProps) => {
const empty = !props.selectedTags || props.selectedTags.length === 0;
@@ -379,11 +383,14 @@ const DesktopTagsInlineEditor = ({
align: 'start',
sideOffset: 0,
avoidCollisions: false,
className: styles.tagsMenu,
className: clsx(styles.tagsMenu, menuClassName),
onClick(e) {
e.stopPropagation();
},
}}
rootOptions={{
modal: modalMenu,
}}
items={<TagsEditor {...props} />}
>
<div