mirror of
https://github.com/alrayyes/wiki.git
synced 2025-06-09 07:03:38 +00:00
chore(types): add additional hint for LSP support (#864)
Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
parent
b87a701ff7
commit
21c6bbf302
18 changed files with 59 additions and 35 deletions
quartz/components
|
@ -1,4 +1,4 @@
|
|||
import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
||||
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
||||
import breadcrumbsStyle from "./styles/breadcrumbs.scss"
|
||||
import { FullSlug, SimpleSlug, resolveRelative } from "../util/path"
|
||||
import { QuartzPluginData } from "../plugins/vfile"
|
||||
|
@ -54,7 +54,11 @@ export default ((opts?: Partial<BreadcrumbOptions>) => {
|
|||
// computed index of folder name to its associated file data
|
||||
let folderIndex: Map<string, QuartzPluginData> | undefined
|
||||
|
||||
function Breadcrumbs({ fileData, allFiles, displayClass }: QuartzComponentProps) {
|
||||
const Breadcrumbs: QuartzComponent = ({
|
||||
fileData,
|
||||
allFiles,
|
||||
displayClass,
|
||||
}: QuartzComponentProps) => {
|
||||
// Hide crumbs on root if enabled
|
||||
if (options.hideOnRoot && fileData.slug === "index") {
|
||||
return <></>
|
||||
|
@ -121,5 +125,6 @@ export default ((opts?: Partial<BreadcrumbOptions>) => {
|
|||
)
|
||||
}
|
||||
Breadcrumbs.css = breadcrumbsStyle
|
||||
|
||||
return Breadcrumbs
|
||||
}) satisfies QuartzComponentConstructor
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue