Skip to content

Commit

Permalink
fix(breadcrumb): ref type
Browse files Browse the repository at this point in the history
  • Loading branch information
aesteves60 authored and dpellier committed Dec 13, 2023
1 parent 4aedd79 commit ae98d6e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
13 changes: 13 additions & 0 deletions packages/common/core/src/types/ods-html-anchor-element-rel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,31 @@ export enum OdsHTMLAnchorElementRel {
alternate = 'alternate',
author = 'author',
bookmark = 'bookmark',
canonical = 'canonical',
'dns-prefetch' = 'dns-prefetch',
external = 'external',
help = 'help',
icon = 'icon',
license = 'license',
manifest = 'manifest',
me = 'me',
modulepreload = 'modulepreload',
next = 'next',
nofollow = 'nofollow',
noopener = 'noopener',
noreferrer = 'noreferrer',
opener = 'opener',
pingback = 'pingback',
preconnect = 'preconnect',
prefetch = 'prefetch',
preload = 'preload',
prerender = 'prerender',
prev = 'prev',
'privacy-policy' = 'privacy-policy',
search = 'search',
stylesheet = 'stylesheet',
tag = 'tag',
'terms-of-service' = 'terms-of-service'
}

export type OdsHTMLAnchorElementRelUnion = `${OdsHTMLAnchorElementRel}`;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { ODS_ICON_NAME } from '@ovhcloud/ods-component-icon';
import type { OdsHTMLAnchorElementTarget } from '@ovhcloud/ods-common-core';
import type { OdsHTMLAnchorElementRel, OdsHTMLAnchorElementTarget } from '@ovhcloud/ods-common-core';
import type { ODS_LINK_REFERRER_POLICY } from '@ovhcloud/ods-component-link';

interface OdsBreadcrumbItemAttribute {
/** contrasted or not: see component principles */
Expand All @@ -19,9 +20,9 @@ interface OdsBreadcrumbItemAttribute {
/** Text to display */
label?: string
/** Link referrer policy */
referrerpolicy?: HTMLLinkElement['referrerPolicy'];
referrerpolicy?: ODS_LINK_REFERRER_POLICY;
/** Link relationship */
rel?: HTMLLinkElement['rel'];
rel?: OdsHTMLAnchorElementRel;
/**
* Link target type
* Specifies where to open the link
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { OdsBreadcrumbItemAttribute } from './interfaces/attributes';

import type { OdsHTMLAnchorElementTarget } from '@ovhcloud/ods-common-core';
import type { OdsHTMLAnchorElementRel, OdsHTMLAnchorElementTarget } from '@ovhcloud/ods-common-core';
import type { ODS_LINK_REFERRER_POLICY } from '@ovhcloud/ods-component-link';
import { ODS_THEME_COLOR_INTENT } from '@ovhcloud/ods-common-theming';
import { ODS_ICON_NAME, ODS_ICON_SIZE } from '@ovhcloud/ods-component-icon';
Expand Down Expand Up @@ -51,7 +51,7 @@ export class OsdsBreadcrumbItem implements OdsBreadcrumbItemAttribute, OdsBreadc
@Prop({ reflect: true }) referrerpolicy?: ODS_LINK_REFERRER_POLICY;

/** @see OdsBreadcrumbItemAttribute.rel */
@Prop({ reflect: true }) rel?: HTMLLinkElement['rel'];
@Prop({ reflect: true }) rel?: OdsHTMLAnchorElementRel;

/** @see OdsBreadcrumbItemAttribute.target */
@Prop({ reflect: true }) target?: OdsHTMLAnchorElementTarget = DEFAULT_ATTRIBUTE.target;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ODS_ICON_NAME } from '@ovhcloud/ods-component-icon';
import type { ODS_LINK_REFERRER_POLICY } from '@ovhcloud/ods-component-link';
import type { OdsHTMLAnchorElementTarget } from '@ovhcloud/ods-common-core';
import type { OdsHTMLAnchorElementRel, OdsHTMLAnchorElementTarget } from '@ovhcloud/ods-common-core';

interface OdsBreadcrumbAttributeItem {
/** Item should be disabled or not */
Expand All @@ -14,7 +14,7 @@ interface OdsBreadcrumbAttributeItem {
/** Link referrer policy */
referrerpolicy?: ODS_LINK_REFERRER_POLICY;
/** Link relationship */
rel?: HTMLLinkElement['rel'];
rel?: OdsHTMLAnchorElementRel;
/** Specifies where to open the link */
target?: OdsHTMLAnchorElementTarget;
}
Expand Down

0 comments on commit ae98d6e

Please sign in to comment.