diff --git a/docs/src/components/content-container.md b/docs/src/components/content-container.md index f422328..3e28750 100644 --- a/docs/src/components/content-container.md +++ b/docs/src/components/content-container.md @@ -19,7 +19,7 @@ The appropriate HTML element for the page structure is determined based on the ` ## Properties ```ts -type Props = { +type ContentContainerProps = { tag?: string; rootTags?: string[]; contentTags?: string[]; diff --git a/docs/src/components/content-headline.md b/docs/src/components/content-headline.md index 8d2e44d..248c6f1 100644 --- a/docs/src/components/content-headline.md +++ b/docs/src/components/content-headline.md @@ -21,7 +21,7 @@ The deeper the nesting, the smaller the heading. ## Properties ```ts -type Props = { +type ContentHeadlineProps = { tag: string; debug: boolean; }; diff --git a/src/ContentContainer.ts b/src/ContentContainer.ts index bd502df..8d4c85d 100644 --- a/src/ContentContainer.ts +++ b/src/ContentContainer.ts @@ -1,7 +1,7 @@ import { defineComponent, h, inject, provide, type ComponentOptions } from 'vue'; import useContentContainer from './useContentContainer'; -export type Props = { +export type ContentContainerProps = { tag?: string; rootTags?: string[]; contentTags?: string[]; @@ -9,7 +9,7 @@ export type Props = { debug?: boolean; }; -export type Context = Props & { +export type ContentContainerContext = ContentContainerProps & { parentLevel: number; currentLevel: number; currentTag: string; @@ -46,13 +46,13 @@ const ContentContainer = defineComponent({ } }, - setup(props: Props) { + setup(props: ContentContainerProps) { const { parentLevel, currentLevel, currentTag } = useContentContainer(props); provide('semanticStructure_debug', props.debug); return { parentLevel, currentLevel, currentTag }; }, - render(this: Context & ComponentOptions) { + render(this: ContentContainerContext & ComponentOptions) { const { currentTag, parentLevel, currentLevel } = this; return h( @@ -73,7 +73,7 @@ const ContentContainer = defineComponent({ } }); -const getDebugAttrs = (context: Context) => { +const getDebugAttrs = (context: ContentContainerContext) => { if (context.debug) { return { 'data-current-tag': context.currentTag, diff --git a/src/ContentHeadline.ts b/src/ContentHeadline.ts index c537313..59427e1 100644 --- a/src/ContentHeadline.ts +++ b/src/ContentHeadline.ts @@ -1,12 +1,12 @@ import { defineComponent, h, inject, type ComponentOptions } from 'vue'; import useContentHeadline from './useContentHeadline'; -export type Props = { +export type ContentHeadlineProps = { tag: string; debug: boolean; }; -export type Context = Props & { +export type ContentHeadlineContext = ContentHeadlineProps & { parentLevel: number; currentLevel: number; currentTag: string; @@ -32,7 +32,7 @@ const ContentHeadline = defineComponent({ return { parentLevel, currentLevel, currentTag }; }, - render(this: Context & ComponentOptions) { + render(this: ContentHeadlineContext & ComponentOptions) { const { currentTag, currentLevel } = this; return h( currentTag, @@ -51,7 +51,7 @@ const ContentHeadline = defineComponent({ } }); -const getDebugAttrs = (context: Context) => { +const getDebugAttrs = (context: ContentHeadlineContext) => { if (context.debug) { return { 'data-current-tag': context.currentTag,