Skip to content

Commit

Permalink
update headline usages in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
larsrickert committed Jan 23, 2025
1 parent 8a4ff78 commit c470112
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/docs/src/.vitepress/components/ComponentCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const props = defineProps<ComponentCardProps>();
:href="props.href"
:target="props.href?.startsWith('http') ? '_blank' : '_self'"
>
<OnyxHeadline is="h2">{{ props.name }}</OnyxHeadline>
<OnyxHeadline is="h3" visual-size="h2">{{ props.name }}</OnyxHeadline>
<ComponentStatusBadge :status="props.status" class="card__status" />
</component>
</template>
Expand Down
5 changes: 4 additions & 1 deletion apps/docs/src/.vitepress/components/OnyxTypography.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const getTextSizeClass = (fontSize?: TextSize) => {
{{ previewText }}
</OnyxLink>

<OnyxHeadline :is="variable.htmlTag" v-else :monospace="isMonospace">
<OnyxHeadline is="h3" v-else :visual-size="variable.htmlTag" :monospace="isMonospace">
{{ previewText }}
</OnyxHeadline>
</template>
Expand Down Expand Up @@ -95,6 +95,9 @@ const getTextSizeClass = (fontSize?: TextSize) => {
padding: 0;
border: none;
letter-spacing: normal;
font-size: revert-layer;
line-height: revert-layer;
font-weight: revert-layer;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test.describe("Screenshot tests", () => {
test.describe("Screenshot tests (visual size)", () => {
executeMatrixScreenshotTest({
name: "Headline (visual sizes)",
columns: ["h1", "h2", "h3", "h4"],
columns: HEADLINE_TYPES,
rows: HEADLINE_TYPES,
component: (column, row) => (
<OnyxHeadline is={row} visualSize={column}>
Expand Down
2 changes: 1 addition & 1 deletion packages/sit-onyx/src/components/OnyxHeadline/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export type OnyxHeadlineProps = {
* Visual size of the headline (h1-h6). Will default to but can be different from the semantical `is` property.
* Please note that only h1-h4 are intended to be used from UX perspective, h5 and h6 will have the same styles as h4.
*/
visualSize?: Exclude<HeadlineType, "h5" | "h6">;
visualSize?: HeadlineType;
/**
* Unique headline hash/ID (without "#") that is used to show a "#" icon on hover. Makes the headline clickable and a URL that points to this headline
* is copied to the users clipboard. Will be automatically normalized when containing non URL-safe characters.
Expand Down

0 comments on commit c470112

Please sign in to comment.