@windstream/react-shared-components 0.2.80 → 0.2.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,11 +3,13 @@ import React from "react";
3
3
  import { MaterialIcon } from "@shared/components/material-icon";
4
4
  import { Button } from "@shared/contentful/blocks/button";
5
5
  import { ButtonProps as ContentfulButtonProps } from "@shared/contentful/blocks/button/types";
6
+ import type { FieldProps } from "@shared/types/field-props";
6
7
 
7
8
  type ComponentButtonGroup = {
8
9
  anchorId?: string | null;
9
10
  title?: string | null;
10
11
  items?: { items?: ContentfulButtonProps[] | null } | null;
12
+ fieldProps?: FieldProps<"title">;
11
13
  };
12
14
 
13
15
  type Link = ContentfulButtonProps | ComponentButtonGroup;
@@ -38,7 +40,7 @@ export const MobileLinkGroups: React.FC<LinkGroupsProps> = ({ link }) => {
38
40
  }
39
41
 
40
42
  // Group
41
- const { anchorId, title, items } = link;
43
+ const { anchorId, title, items, fieldProps } = link;
42
44
  const subMenu = Array.isArray(items?.items) ? items!.items! : [];
43
45
 
44
46
  return (
@@ -49,6 +51,7 @@ export const MobileLinkGroups: React.FC<LinkGroupsProps> = ({ link }) => {
49
51
  buttonClassName=" label3 flex items-center w-full h-11 px-4"
50
52
  key={anchorId}
51
53
  showButtonAs="unstyled"
54
+ fieldProps={fieldProps?.title}
52
55
  >
53
56
  {title ?? null}
54
57
  <MaterialIcon
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
 
3
+ import type { FieldProps } from "@shared/types/field-props";
3
4
  import { Asset, Button, ButtonGroup } from "@shared/types/micro-components";
4
5
 
5
6
  type Color = string;
@@ -69,6 +70,10 @@ export interface Navigation {
69
70
  /** When true, renders the mobile hamburger navigation in the desktop
70
71
  * viewport and hides the inline desktop nav. Defaults to false. */
71
72
  enableHamburgerNavigationOnDesktop?: boolean;
73
+ /** Extra DOM attribute props, spread onto the respective rendered elements. */
74
+ fieldProps?: FieldProps<
75
+ "logo" | "searchBarIcon" | "callNowCtaText" | "callNowCtaIcon"
76
+ >;
72
77
  }
73
78
 
74
79
  export type NavigationProps = Navigation;
@@ -1,3 +1,5 @@
1
+ import type { FieldProps } from "./field-props";
2
+
1
3
  import { ButtonProps } from "@shared/contentful";
2
4
 
3
5
  export interface Asset {
@@ -29,6 +31,8 @@ export interface Button {
29
31
  clickToOpen?: "accordion" | "modal" | "tab" | null;
30
32
  tabmodalNameToOpen?: string | null;
31
33
  preDefinedFunctionExecution?: "check availability" | null;
34
+ /** Extra DOM attribute props, spread onto the rendered link/button element. */
35
+ fieldProps?: Record<string, unknown>;
32
36
  }
33
37
 
34
38
  export interface ButtonGroup {
@@ -38,6 +42,8 @@ export interface ButtonGroup {
38
42
  itemsCollection?: {
39
43
  items: Button[];
40
44
  };
45
+ /** Extra DOM attribute props, spread onto the group's title element. */
46
+ fieldProps?: FieldProps<"title">;
41
47
  }
42
48
  export interface Card {
43
49
  anchorId?: string;