From 4ad843e5bffdc444101b81274846a33df790012a Mon Sep 17 00:00:00 2001 From: Daniel Sil Date: Wed, 31 May 2023 15:46:16 +0200 Subject: [PATCH] fix(SkipNavigation): change label types to string --- packages/orbit-components/src/SkipNavigation/index.tsx | 2 +- packages/orbit-components/src/SkipNavigation/types.d.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/orbit-components/src/SkipNavigation/index.tsx b/packages/orbit-components/src/SkipNavigation/index.tsx index e605a88884..538680a0cd 100644 --- a/packages/orbit-components/src/SkipNavigation/index.tsx +++ b/packages/orbit-components/src/SkipNavigation/index.tsx @@ -49,7 +49,7 @@ const SkipNavigation = ({ }: Props) => { const [links, setLinks] = React.useState([]); const [mappedLinks, setMappedLinks] = React.useState([]); - const [innerPages, setPages] = React.useState<{ value: number; label?: React.ReactNode }[]>([]); + const [innerPages, setPages] = React.useState<{ value: number; label?: string }[]>([]); const [show, setShow] = React.useState(false); const handleLinksClick = (ev: React.SyntheticEvent) => { diff --git a/packages/orbit-components/src/SkipNavigation/types.d.ts b/packages/orbit-components/src/SkipNavigation/types.d.ts index 8ef636341a..af202a5035 100644 --- a/packages/orbit-components/src/SkipNavigation/types.d.ts +++ b/packages/orbit-components/src/SkipNavigation/types.d.ts @@ -12,14 +12,14 @@ interface Action { export interface Props { readonly actions?: Action[]; readonly feedbackUrl?: string; - readonly firstSectionLabel?: React.ReactNode; - readonly firstActionLabel?: React.ReactNode; - readonly feedbackLabel?: React.ReactNode; + readonly firstSectionLabel?: string; + readonly firstActionLabel?: string; + readonly feedbackLabel?: string; } export interface MappedOptions { readonly key?: string; readonly value: string | number; - readonly label?: React.ReactNode; + readonly label?: string; readonly disabled?: boolean; }