import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types" import style from "./styles/search.scss" // @ts-ignore import script from "./scripts/search.inline" import { classNames } from "../util/lang" import { i18n } from "../i18n" export interface SearchOptions { enablePreview: boolean } const defaultOptions: SearchOptions = { enablePreview: true, } export default ((userOpts?: Partial) => { const Search: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => { const opts = { ...defaultOptions, ...userOpts } const searchPlaceholder = i18n(cfg.locale).components.search.searchBarPlaceholder return (
) } Search.afterDOMLoaded = script Search.css = style return Search }) satisfies QuartzComponentConstructor