diff --git a/app/assets/javascripts/components/NoteTags.tsx b/app/assets/javascripts/components/NoteTags.tsx index 534b4964d..f91bcc509 100644 --- a/app/assets/javascripts/components/NoteTags.tsx +++ b/app/assets/javascripts/components/NoteTags.tsx @@ -1,7 +1,7 @@ import { AppState } from '@/ui_models/app_state'; import { observer } from 'mobx-react-lite'; import { toDirective } from './utils'; -import { Icon } from './Icon'; +import { Tag } from './Tag'; import { AutocompleteTagInput } from './AutocompleteTagInput'; import { WebApplication } from '@/ui_models/application'; @@ -14,10 +14,7 @@ const NoteTags = observer(({ application, appState }: Props) => { return (
{appState.notes.activeNoteTags.map((tag) => ( - - - {tag.title} - + ))}
diff --git a/app/assets/javascripts/components/Tag.tsx b/app/assets/javascripts/components/Tag.tsx new file mode 100644 index 000000000..53f4d1709 --- /dev/null +++ b/app/assets/javascripts/components/Tag.tsx @@ -0,0 +1,16 @@ +import { FunctionalComponent } from 'preact'; +import { Icon } from './Icon'; + +type TagProps = { + title: string; + className?: string; +}; + +export const Tag: FunctionalComponent = ({ title, className }) => ( + + + {title} + +);