Files
commafeed/commafeed-client/src/components/content/FeedEntryTitle.tsx

14 lines
441 B
TypeScript
Raw Normal View History

2022-10-27 16:25:32 +02:00
import { Highlight } from "@mantine/core"
import { useAppSelector } from "app/store"
import { Entry } from "app/types"
export interface FeedEntryTitleProps {
entry: Entry
}
export function FeedEntryTitle(props: FeedEntryTitleProps) {
const search = useAppSelector(state => state.entries.search)
const keywords = search?.split(" ")
return <Highlight highlight={keywords ?? ""}>{props.entry.title}</Highlight>
}