@uob-web-and-digital/component-library 0.0.2 → 0.0.3

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/index.d.ts CHANGED
@@ -1,7 +1,80 @@
1
- import './base.scss';
2
- import Footer from './components/Footer/Footer';
3
- import { Header } from './components/Header/Header';
4
- import MainWrapper from './components/MainWrapper/MainWrapper';
5
- import SignPost from './components/SignPost/SignPost';
6
- import SkipToContent from './components/SkipToContent/SkipToContent';
1
+ import { ReactElement, PropsWithChildren } from 'react';
2
+
3
+ type ThemeProps = 'uobmain' | 'redexample';
4
+
5
+ interface FooterLinkProps {
6
+ label: string;
7
+ href: string;
8
+ externalLink: boolean;
9
+ }
10
+ interface FooterProps {
11
+ theme: ThemeProps;
12
+ summaryLinks: FooterLinkProps[];
13
+ hygieneLinks: FooterLinkProps[];
14
+ locations: FooterLinkProps[];
15
+ }
16
+ declare function Footer({ theme, locations, summaryLinks, hygieneLinks }: FooterProps): ReactElement;
17
+
18
+ interface HeaderLink {
19
+ label: string;
20
+ url: string;
21
+ description?: string;
22
+ children?: HeaderLink[];
23
+ }
24
+
25
+ interface HeaderProps {
26
+ /**
27
+ * The theme to use
28
+ */
29
+ theme: ThemeProps;
30
+ /**
31
+ * Large nav links on the main menu
32
+ */
33
+ primaryLinks: HeaderLink[];
34
+ /**
35
+ * Small nav links on the main menu
36
+ */
37
+ secondaryLinks: HeaderLink[];
38
+ homepageUrl: string;
39
+ dubaiUrl: string;
40
+ ukUrl: string;
41
+ activeCampus: 'uk' | 'dubai';
42
+ }
43
+ declare const Header: ({ theme, primaryLinks, secondaryLinks, homepageUrl, dubaiUrl, ukUrl, activeCampus }: HeaderProps) => ReactElement;
44
+
45
+ interface MainWrapperProps {
46
+ }
47
+ declare function MainWrapper({ children }: PropsWithChildren<MainWrapperProps>): ReactElement;
48
+
49
+ interface SignPostProps {
50
+ /**
51
+ * The theme to use
52
+ */
53
+ theme: ThemeProps;
54
+ /**
55
+ * Whether to inverse the colours
56
+ */
57
+ inverse?: boolean;
58
+ /**
59
+ * A SignPost can have 2 or 4 items
60
+ */
61
+ items: readonly [SignPostItem, SignPostItem];
62
+ }
63
+ type SignPostItem = {
64
+ title: string;
65
+ tag: string;
66
+ linkLabel: string;
67
+ linkUrl: string;
68
+ external?: boolean;
69
+ };
70
+ /**
71
+ * Text promo block with a link
72
+ */
73
+ declare function SignPost({ theme, inverse, items }: SignPostProps): ReactElement;
74
+
75
+ interface SkipToContentProps {
76
+ theme: ThemeProps;
77
+ }
78
+ declare function SkipToContent({ theme }: SkipToContentProps): ReactElement;
79
+
7
80
  export { Footer, Header, MainWrapper, SignPost, SkipToContent };