@uob-web-and-digital/component-library 0.0.34 → 0.0.35
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.
- package/dist/components/molecules/AccordionItem/AccordionItem.d.ts +12 -0
- package/dist/components/molecules/AccordionItem/AccordionItem.stories.d.ts +18 -0
- package/dist/components/organisms/Accordion/Accordion.d.ts +12 -0
- package/dist/components/organisms/Accordion/accordion.stories.d.ts +12 -0
- package/dist/components/organisms/Accordion/defaultProps.d.ts +2 -0
- package/dist/main.css +1 -1
- package/dist/main.js +5 -5
- package/dist/module.js +5 -5
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { ThemeProps } from '../../../themeProps';
|
|
3
|
+
import './accordionItem.scss';
|
|
4
|
+
export interface AccordionItemProps {
|
|
5
|
+
key?: number;
|
|
6
|
+
title: string;
|
|
7
|
+
text: string;
|
|
8
|
+
theme: ThemeProps;
|
|
9
|
+
inverse?: boolean;
|
|
10
|
+
titleTag: 'h2' | 'h3' | 'h4';
|
|
11
|
+
}
|
|
12
|
+
export default function AccordionItem({ theme, title, text, inverse, titleTag }: AccordionItemProps): ReactElement;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import type { StoryObj } from '@storybook/react';
|
|
3
|
+
import AccordionItem from './AccordionItem';
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: typeof AccordionItem;
|
|
7
|
+
tags: string[];
|
|
8
|
+
parameters: {
|
|
9
|
+
backgrounds: {
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default meta;
|
|
15
|
+
type Story = StoryObj<typeof AccordionItem>;
|
|
16
|
+
export declare const Light: Story;
|
|
17
|
+
export declare const Dark: Story;
|
|
18
|
+
export declare const Stacked: () => ReactElement;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { ThemeProps } from '../../../themeProps';
|
|
3
|
+
import { AccordionItemProps } from '../../molecules/AccordionItem/AccordionItem';
|
|
4
|
+
import './accordion.scss';
|
|
5
|
+
import { HeadingProps } from '../../molecules/Heading/Heading';
|
|
6
|
+
export interface AccordionProps {
|
|
7
|
+
theme: ThemeProps;
|
|
8
|
+
inverse?: boolean;
|
|
9
|
+
heading?: Omit<HeadingProps, 'theme' | 'inverse'>;
|
|
10
|
+
accordionItems: AccordionItemProps[];
|
|
11
|
+
}
|
|
12
|
+
export default function Accordion({ theme, inverse, heading, accordionItems }: AccordionProps): ReactElement;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import Accordion from './Accordion';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Accordion;
|
|
6
|
+
tags: string[];
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof meta>;
|
|
10
|
+
export declare const Default: Story;
|
|
11
|
+
export declare const Light: Story;
|
|
12
|
+
export declare const Dark: Story;
|