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.
- package/dist/cjs/types/components/atoms/LegalLinks/LegalLinks.component.d.ts +4 -0
- package/dist/cjs/types/components/atoms/LegalLinks/LegalLinks.interface.d.ts +10 -0
- package/dist/cjs/types/components/atoms/LegalLinks/LegalLinks.theme.d.ts +3 -0
- package/dist/cjs/types/components/atoms/LegalLinks/index.d.ts +1 -0
- package/dist/esm/types/components/atoms/LegalLinks/LegalLinks.component.d.ts +4 -0
- package/dist/esm/types/components/atoms/LegalLinks/LegalLinks.interface.d.ts +10 -0
- package/dist/esm/types/components/atoms/LegalLinks/LegalLinks.theme.d.ts +3 -0
- package/dist/esm/types/components/atoms/LegalLinks/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/atoms/LegalLinks/LegalLinks.component.tsx +35 -0
- package/src/components/atoms/LegalLinks/LegalLinks.interface.ts +12 -0
- package/src/components/atoms/LegalLinks/LegalLinks.stories.tsx +43 -0
- package/src/components/atoms/LegalLinks/LegalLinks.theme.ts +23 -0
- package/src/components/atoms/LegalLinks/index.ts +1 -0
|
@@ -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,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
|
@@ -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,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'
|