@uob-web-and-digital/component-library 2.18.0 → 2.18.1

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.
@@ -11,7 +11,7 @@ export interface CardNewsProps {
11
11
  title: string;
12
12
  href: string;
13
13
  publishDate: string;
14
- titleTag: HeadingProps['htmlTag'];
14
+ titleTag?: HeadingProps['htmlTag'];
15
15
  }
16
16
  /**
17
17
  * Primary UI component for user interaction
@@ -1,5 +1,6 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { ThemeProps } from '../../../themeProps';
3
+ import { HeadingProps } from '../../atoms/Heading/Heading';
3
4
  import './cardScholarship.scss';
4
5
  export interface ScholarshipProps {
5
6
  awardType: string;
@@ -13,7 +14,7 @@ export interface CardScholarshipProps {
13
14
  copy: string;
14
15
  href: string;
15
16
  scholarshipDetails: ScholarshipProps;
16
- titleTag?: 'h2' | 'h3';
17
+ titleTag?: HeadingProps['htmlTag'];
17
18
  }
18
19
  /**
19
20
  * Primary UI component for user interaction
@@ -7,6 +7,15 @@ declare const meta: {
7
7
  parameters: {
8
8
  layout: string;
9
9
  };
10
+ argTypes: {
11
+ titleTag: {
12
+ control: "select";
13
+ options: string[];
14
+ mapping: {
15
+ none: undefined;
16
+ };
17
+ };
18
+ };
10
19
  };
11
20
  export default meta;
12
21
  type Story = StoryObj<typeof CardScholarship>;
@@ -1,6 +1,7 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { ImageProps } from '../../atoms/Image/Image';
3
3
  import { ThemeProps } from '../../../themeProps';
4
+ import { HeadingProps } from '../../atoms/Heading/Heading';
4
5
  import './cardStaff.scss';
5
6
  export interface CardStaffProps {
6
7
  theme: ThemeProps;
@@ -14,7 +15,7 @@ export interface CardStaffProps {
14
15
  isSingle?: boolean;
15
16
  phone?: string;
16
17
  email?: string;
17
- titleTag?: 'h2' | 'h3';
18
+ titleTag?: HeadingProps['htmlTag'];
18
19
  }
19
20
  /**
20
21
  * Primary UI component for user interaction
@@ -7,6 +7,15 @@ declare const meta: {
7
7
  parameters: {
8
8
  layout: string;
9
9
  };
10
+ argTypes: {
11
+ titleTag: {
12
+ control: "select";
13
+ options: string[];
14
+ mapping: {
15
+ none: undefined;
16
+ };
17
+ };
18
+ };
10
19
  };
11
20
  export default meta;
12
21
  type Story = StoryObj<typeof CardStaff>;
@@ -2,12 +2,13 @@ import { ReactElement } from 'react';
2
2
  import { ImageProps } from '../../../atoms/Image/Image';
3
3
  import { SearchResultDetailProps } from '../../../atoms/SearchResultDetail/SearchResultDetail';
4
4
  import { ThemeProps } from '../../../../themeProps';
5
+ import { HeadingProps } from '../../../atoms/Heading/Heading';
5
6
  export interface CourseCardProps {
6
7
  theme: ThemeProps;
7
8
  type: 'course';
8
9
  image?: ImageProps;
9
10
  title: string;
10
- titleTag?: string;
11
+ titleTag?: HeadingProps['htmlTag'];
11
12
  url: string;
12
13
  description?: string;
13
14
  supervisors?: string;
@@ -19,4 +19,7 @@ export declare const NewsCardTwoAuthors: Story;
19
19
  export declare const AccomodationCard: Story;
20
20
  export declare const CourseCard: Story;
21
21
  export declare const CourseCardH3Title: Story;
22
+ export declare const CourseCardH4Title: Story;
23
+ export declare const CourseCardH5Title: Story;
24
+ export declare const CourseCardUndefinedTitleTag: Story;
22
25
  export declare const ProfileCard: Story;
@@ -20,10 +20,11 @@ export interface CarouselProps {
20
20
  inverse?: boolean;
21
21
  type: string;
22
22
  title?: string;
23
+ titleTag?: HeadingProps['htmlTag'];
23
24
  cardTitleTag?: HeadingProps['htmlTag'];
24
25
  setCardInverse?: 'dark' | 'light';
25
- cards: Omit<CardNewsProps, 'titleTag'>[] | CardFeaturedProps[] | CardVideoProps[] | CardPromoProps[] | CardPromoSignpostProps[] | CardPromoVideoProps[] | CardStaffProps[] | CardRelatedProps[] | CardImageProps[] | CardFeaturedNewsProps[] | CardResearchStoryProps[] | CardScholarshipProps[] | CardPromoProfileProps[];
26
+ cards: CardNewsProps[] | CardFeaturedProps[] | CardVideoProps[] | CardPromoProps[] | CardPromoSignpostProps[] | CardPromoVideoProps[] | CardStaffProps[] | CardRelatedProps[] | CardImageProps[] | CardFeaturedNewsProps[] | CardResearchStoryProps[] | CardScholarshipProps[] | CardPromoProfileProps[];
26
27
  exploreMore?: string;
27
28
  cardCopyIsRichText?: boolean;
28
29
  }
29
- export default function Carousel({ theme, inverse, type, title, cards, cardTitleTag, setCardInverse, exploreMore, cardCopyIsRichText }: CarouselProps): ReactElement;
30
+ export default function Carousel({ theme, inverse, type, title, cards, titleTag, cardTitleTag, setCardInverse, exploreMore, cardCopyIsRichText }: CarouselProps): ReactElement;