oddsgate-ds 1.0.166 → 1.0.168

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.
@@ -0,0 +1,4 @@
1
+ import { ILegalLinks } from './LegalLinks.interface';
2
+ import React from 'react';
3
+ declare const LegalLinks: ({ links, className, style, }: ILegalLinks) => React.JSX.Element;
4
+ export default LegalLinks;
@@ -0,0 +1,10 @@
1
+ import { CSSProperties } from 'react';
2
+ export type ILegalLink = {
3
+ label: string;
4
+ url: string;
5
+ };
6
+ export type ILegalLinks = {
7
+ links?: ILegalLink[];
8
+ className?: string;
9
+ style?: CSSProperties;
10
+ };
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { ILegalLinks } from './LegalLinks.interface';
3
+ export declare const StyledLegalLinks: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, ILegalLinks>> & string;
@@ -0,0 +1 @@
1
+ export { default } from './LegalLinks.component';
@@ -21,6 +21,7 @@ export { default as CloseButton } from './components/atoms/CloseButton';
21
21
  export { default as Counter } from './components/atoms/Counter';
22
22
  export { default as ScrollingNav } from './components/atoms/ScrollingNav';
23
23
  export { default as SocialLinks } from './components/atoms/SocialLinks';
24
+ export { default as LegalLinks } from './components/atoms/LegalLinks';
24
25
  export { default as Marquee } from './components/atoms/Marquee';
25
26
  export { default as CardMarquee } from './components/atoms/CardMarquee';
26
27
  export { default as PortalComponent } from './components/common/PortalComponent';
package/dist/types.d.ts CHANGED
@@ -380,6 +380,18 @@ type ISocialLinks = {
380
380
 
381
381
  declare const SocialLinks: ({ variant, socials, className, style, ...props }: ISocialLinks) => React__default.JSX.Element;
382
382
 
383
+ type ILegalLink = {
384
+ label: string;
385
+ url: string;
386
+ };
387
+ type ILegalLinks = {
388
+ links?: ILegalLink[];
389
+ className?: string;
390
+ style?: CSSProperties;
391
+ };
392
+
393
+ declare const LegalLinks: ({ links, className, style, }: ILegalLinks) => React__default.JSX.Element;
394
+
383
395
  type IMarquee = {
384
396
  text?: string;
385
397
  repeat?: number;
@@ -682,4 +694,4 @@ declare function useMediaMatch(query?: string): boolean;
682
694
 
683
695
  declare const debounce: (callback: any, wait: number) => (...args: any) => void;
684
696
 
685
- export { Accordion, AccordionItem, BlogCard, Button, CardMarquee, CareersCard, CheckRadioField, Chip, CircularSlider, CloseButton, Column, Counter, Cover, Dropdown, DropdownItem, EmptyState, EventsCard, Flex, FormField, GlobalStyles, Heading, Icon, IconBox, IconTitle, ImageWrapper, LicenseCard, Loader, LogosCard, Marquee, Modal, NewsCard, OffCanvas, PortalComponent, ProductCard, ProductsSlider, Quote, RichText, Row, ScrollingNav, Separator, ShareModal, Slider, SocialLinks, Spacer, Tabs, TeamCard, Video, VideoEmbed, clickOutSideToClose, debounce, iconsList, isTouchDevice, useMediaMatch, variables };
697
+ export { Accordion, AccordionItem, BlogCard, Button, CardMarquee, CareersCard, CheckRadioField, Chip, CircularSlider, CloseButton, Column, Counter, Cover, Dropdown, DropdownItem, EmptyState, EventsCard, Flex, FormField, GlobalStyles, Heading, Icon, IconBox, IconTitle, ImageWrapper, LegalLinks, LicenseCard, Loader, LogosCard, Marquee, Modal, NewsCard, OffCanvas, PortalComponent, ProductCard, ProductsSlider, Quote, RichText, Row, ScrollingNav, Separator, ShareModal, Slider, SocialLinks, Spacer, Tabs, TeamCard, Video, VideoEmbed, clickOutSideToClose, debounce, iconsList, isTouchDevice, useMediaMatch, variables };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oddsgate-ds",
3
- "version": "1.0.166",
3
+ "version": "1.0.168",
4
4
  "description": "Miew theme component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -0,0 +1,35 @@
1
+ import { ILegalLinks } from './LegalLinks.interface'
2
+ import React from 'react'
3
+ import { StyledLegalLinks } from './LegalLinks.theme'
4
+
5
+ const LegalLinks = ({
6
+ links,
7
+ className,
8
+ style,
9
+ }: ILegalLinks) => {
10
+ if (!links) return <></>
11
+
12
+ return (
13
+ <StyledLegalLinks className={className} style={style}>
14
+ {links.map((link, index) => {
15
+ if (!link.label || !link.url) return <></>
16
+
17
+ return (
18
+ <li key={`legalLink-${index}`}>
19
+ <a
20
+ href={link.url}
21
+ target="_blank"
22
+ aria-label={link.label}
23
+ rel="noreferrer"
24
+ className="font-epilogue"
25
+ >
26
+ {link.label}
27
+ </a>
28
+ </li>
29
+ )
30
+ })}
31
+ </StyledLegalLinks>
32
+ )
33
+ }
34
+
35
+ export default LegalLinks
@@ -0,0 +1,12 @@
1
+ import { CSSProperties } from 'react';
2
+
3
+ export type ILegalLink = {
4
+ label: string
5
+ url: string
6
+ }
7
+
8
+ export type ILegalLinks = {
9
+ links?: ILegalLink[]
10
+ className?: string,
11
+ style?: CSSProperties
12
+ }
@@ -0,0 +1,43 @@
1
+ import type { Meta, StoryObj } from '@storybook/react'
2
+
3
+ import { ILegalLinks } from './LegalLinks.interface'
4
+ import React from 'react'
5
+ import LegalLinks from './LegalLinks.component'
6
+
7
+ // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
8
+ export default {
9
+ title: 'Components/LegalLinks',
10
+ component: LegalLinks,
11
+ tags: ['autodocs'],
12
+ argTypes: {}
13
+ } as Meta
14
+
15
+ export const Example: StoryObj<ILegalLinks> = {
16
+ args: {
17
+ links: [
18
+ {
19
+ 'label': 'Terms of Service',
20
+ 'url': 'https://www.miew.com/terms-of-service'
21
+ },
22
+ {
23
+ 'label': 'Privacy Policy',
24
+ 'url': 'https://www.miew.com/privacy-policy'
25
+ },
26
+ {
27
+ 'label': 'Cookie Policy',
28
+ 'url': 'https://www.miew.com/cookie-policy'
29
+ },
30
+ {
31
+ 'label': 'Accessibility Statement',
32
+ 'url': 'https://www.miew.com/accessibility-statement'
33
+ }
34
+ ]
35
+ },
36
+ decorators: [
37
+ (Story) => (
38
+ <div style={{ background: 'black', padding: '2rem' }}>
39
+ {Story()}
40
+ </div>
41
+ )
42
+ ]
43
+ }
@@ -0,0 +1,23 @@
1
+ import { responsiveMedia } from '@/styles/variables'
2
+ import styled from 'styled-components'
3
+
4
+ import { ILegalLinks } from './LegalLinks.interface'
5
+
6
+ export const StyledLegalLinks = styled.ul<ILegalLinks>`
7
+ display: inline-flex;
8
+ align-items: center;
9
+ flex-flow: row wrap;
10
+ gap: 32px;
11
+
12
+ & li {
13
+ & a {
14
+ font-size: 15px;
15
+ font-style: normal;
16
+ font-weight: 400;
17
+ transition: all 0.3s linear;
18
+ &:hover {
19
+ opacity: 0.6;
20
+ }
21
+ }
22
+ }
23
+ `
@@ -0,0 +1 @@
1
+ export { default } from './LegalLinks.component'
package/src/index.ts CHANGED
@@ -23,6 +23,7 @@ export { default as CloseButton } from './components/atoms/CloseButton'
23
23
  export { default as Counter } from './components/atoms/Counter'
24
24
  export { default as ScrollingNav } from './components/atoms/ScrollingNav'
25
25
  export { default as SocialLinks } from './components/atoms/SocialLinks'
26
+ export { default as LegalLinks } from './components/atoms/LegalLinks'
26
27
  export { default as Marquee } from './components/atoms/Marquee'
27
28
  export { default as CardMarquee } from './components/atoms/CardMarquee'
28
29