oddsgate-ds 1.0.166 → 1.0.167

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';
@@ -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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oddsgate-ds",
3
- "version": "1.0.166",
3
+ "version": "1.0.167",
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'