@xyo-network/react-card 2.81.10 → 2.83.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/index.d.ts +52 -2
- package/dist/browser/index.mjs +278 -0
- package/dist/browser/index.mjs.map +1 -0
- package/package.json +14 -30
- package/src/components/CardContentEx.stories.tsx +8 -7
- package/src/components/CardContentEx.tsx +1 -1
- package/src/components/CardEx.tsx +7 -5
- package/src/components/FullWidthCard/FullWidthCard.stories.tsx +3 -3
- package/src/components/FullWidthCard/FullWidthCard.tsx +41 -32
- package/src/components/FullWidthCard/index.ts +1 -1
- package/src/components/PageCard.stories.tsx +6 -5
- package/src/components/PageCard.tsx +11 -9
- package/src/components/SimpleCard/SimpleCard.stories.tsx +4 -4
- package/src/components/SimpleCard/SimpleCard.tsx +65 -53
- package/src/components/SimpleCard/index.ts +1 -1
- package/src/components/SimpleCardGrid/SimpleCardGrid.stories.tsx +4 -4
- package/src/components/SimpleCardGrid/SimpleCardGrid.tsx +2 -1
- package/src/components/SimpleCardGrid/index.ts +1 -1
- package/src/components/index.ts +5 -5
- package/src/index.ts +1 -1
- package/xy.config.ts +12 -0
- package/dist/browser/components/CardContentEx.d.cts +0 -10
- package/dist/browser/components/CardContentEx.d.cts.map +0 -1
- package/dist/browser/components/CardContentEx.d.mts +0 -10
- package/dist/browser/components/CardContentEx.d.mts.map +0 -1
- package/dist/browser/components/CardContentEx.d.ts +0 -10
- package/dist/browser/components/CardContentEx.d.ts.map +0 -1
- package/dist/browser/components/CardEx.d.cts +0 -7
- package/dist/browser/components/CardEx.d.cts.map +0 -1
- package/dist/browser/components/CardEx.d.mts +0 -7
- package/dist/browser/components/CardEx.d.mts.map +0 -1
- package/dist/browser/components/CardEx.d.ts +0 -7
- package/dist/browser/components/CardEx.d.ts.map +0 -1
- package/dist/browser/components/FullWidthCard/FullWidthCard.d.cts +0 -15
- package/dist/browser/components/FullWidthCard/FullWidthCard.d.cts.map +0 -1
- package/dist/browser/components/FullWidthCard/FullWidthCard.d.mts +0 -15
- package/dist/browser/components/FullWidthCard/FullWidthCard.d.mts.map +0 -1
- package/dist/browser/components/FullWidthCard/FullWidthCard.d.ts +0 -15
- package/dist/browser/components/FullWidthCard/FullWidthCard.d.ts.map +0 -1
- package/dist/browser/components/FullWidthCard/index.d.cts +0 -2
- package/dist/browser/components/FullWidthCard/index.d.cts.map +0 -1
- package/dist/browser/components/FullWidthCard/index.d.mts +0 -2
- package/dist/browser/components/FullWidthCard/index.d.mts.map +0 -1
- package/dist/browser/components/FullWidthCard/index.d.ts +0 -2
- package/dist/browser/components/FullWidthCard/index.d.ts.map +0 -1
- package/dist/browser/components/PageCard.d.cts +0 -10
- package/dist/browser/components/PageCard.d.cts.map +0 -1
- package/dist/browser/components/PageCard.d.mts +0 -10
- package/dist/browser/components/PageCard.d.mts.map +0 -1
- package/dist/browser/components/PageCard.d.ts +0 -10
- package/dist/browser/components/PageCard.d.ts.map +0 -1
- package/dist/browser/components/SimpleCard/SimpleCard.d.cts +0 -16
- package/dist/browser/components/SimpleCard/SimpleCard.d.cts.map +0 -1
- package/dist/browser/components/SimpleCard/SimpleCard.d.mts +0 -16
- package/dist/browser/components/SimpleCard/SimpleCard.d.mts.map +0 -1
- package/dist/browser/components/SimpleCard/SimpleCard.d.ts +0 -16
- package/dist/browser/components/SimpleCard/SimpleCard.d.ts.map +0 -1
- package/dist/browser/components/SimpleCard/index.d.cts +0 -2
- package/dist/browser/components/SimpleCard/index.d.cts.map +0 -1
- package/dist/browser/components/SimpleCard/index.d.mts +0 -2
- package/dist/browser/components/SimpleCard/index.d.mts.map +0 -1
- package/dist/browser/components/SimpleCard/index.d.ts +0 -2
- package/dist/browser/components/SimpleCard/index.d.ts.map +0 -1
- package/dist/browser/components/SimpleCardGrid/SimpleCardGrid.d.cts +0 -7
- package/dist/browser/components/SimpleCardGrid/SimpleCardGrid.d.cts.map +0 -1
- package/dist/browser/components/SimpleCardGrid/SimpleCardGrid.d.mts +0 -7
- package/dist/browser/components/SimpleCardGrid/SimpleCardGrid.d.mts.map +0 -1
- package/dist/browser/components/SimpleCardGrid/SimpleCardGrid.d.ts +0 -7
- package/dist/browser/components/SimpleCardGrid/SimpleCardGrid.d.ts.map +0 -1
- package/dist/browser/components/SimpleCardGrid/index.d.cts +0 -2
- package/dist/browser/components/SimpleCardGrid/index.d.cts.map +0 -1
- package/dist/browser/components/SimpleCardGrid/index.d.mts +0 -2
- package/dist/browser/components/SimpleCardGrid/index.d.mts.map +0 -1
- package/dist/browser/components/SimpleCardGrid/index.d.ts +0 -2
- package/dist/browser/components/SimpleCardGrid/index.d.ts.map +0 -1
- package/dist/browser/components/index.d.cts +0 -6
- package/dist/browser/components/index.d.cts.map +0 -1
- package/dist/browser/components/index.d.mts +0 -6
- package/dist/browser/components/index.d.mts.map +0 -1
- package/dist/browser/components/index.d.ts +0 -6
- package/dist/browser/components/index.d.ts.map +0 -1
- package/dist/browser/index.cjs +0 -248
- package/dist/browser/index.cjs.map +0 -1
- package/dist/browser/index.d.cts +0 -2
- package/dist/browser/index.d.cts.map +0 -1
- package/dist/browser/index.d.mts +0 -2
- package/dist/browser/index.d.mts.map +0 -1
- package/dist/browser/index.d.ts.map +0 -1
- package/dist/browser/index.js +0 -225
- package/dist/browser/index.js.map +0 -1
- package/dist/neutral/components/CardContentEx.d.cts +0 -10
- package/dist/neutral/components/CardContentEx.d.cts.map +0 -1
- package/dist/neutral/components/CardContentEx.d.mts +0 -10
- package/dist/neutral/components/CardContentEx.d.mts.map +0 -1
- package/dist/neutral/components/CardContentEx.d.ts +0 -10
- package/dist/neutral/components/CardContentEx.d.ts.map +0 -1
- package/dist/neutral/components/CardEx.d.cts +0 -7
- package/dist/neutral/components/CardEx.d.cts.map +0 -1
- package/dist/neutral/components/CardEx.d.mts +0 -7
- package/dist/neutral/components/CardEx.d.mts.map +0 -1
- package/dist/neutral/components/CardEx.d.ts +0 -7
- package/dist/neutral/components/CardEx.d.ts.map +0 -1
- package/dist/neutral/components/FullWidthCard/FullWidthCard.d.cts +0 -15
- package/dist/neutral/components/FullWidthCard/FullWidthCard.d.cts.map +0 -1
- package/dist/neutral/components/FullWidthCard/FullWidthCard.d.mts +0 -15
- package/dist/neutral/components/FullWidthCard/FullWidthCard.d.mts.map +0 -1
- package/dist/neutral/components/FullWidthCard/FullWidthCard.d.ts +0 -15
- package/dist/neutral/components/FullWidthCard/FullWidthCard.d.ts.map +0 -1
- package/dist/neutral/components/FullWidthCard/index.d.cts +0 -2
- package/dist/neutral/components/FullWidthCard/index.d.cts.map +0 -1
- package/dist/neutral/components/FullWidthCard/index.d.mts +0 -2
- package/dist/neutral/components/FullWidthCard/index.d.mts.map +0 -1
- package/dist/neutral/components/FullWidthCard/index.d.ts +0 -2
- package/dist/neutral/components/FullWidthCard/index.d.ts.map +0 -1
- package/dist/neutral/components/PageCard.d.cts +0 -10
- package/dist/neutral/components/PageCard.d.cts.map +0 -1
- package/dist/neutral/components/PageCard.d.mts +0 -10
- package/dist/neutral/components/PageCard.d.mts.map +0 -1
- package/dist/neutral/components/PageCard.d.ts +0 -10
- package/dist/neutral/components/PageCard.d.ts.map +0 -1
- package/dist/neutral/components/SimpleCard/SimpleCard.d.cts +0 -16
- package/dist/neutral/components/SimpleCard/SimpleCard.d.cts.map +0 -1
- package/dist/neutral/components/SimpleCard/SimpleCard.d.mts +0 -16
- package/dist/neutral/components/SimpleCard/SimpleCard.d.mts.map +0 -1
- package/dist/neutral/components/SimpleCard/SimpleCard.d.ts +0 -16
- package/dist/neutral/components/SimpleCard/SimpleCard.d.ts.map +0 -1
- package/dist/neutral/components/SimpleCard/index.d.cts +0 -2
- package/dist/neutral/components/SimpleCard/index.d.cts.map +0 -1
- package/dist/neutral/components/SimpleCard/index.d.mts +0 -2
- package/dist/neutral/components/SimpleCard/index.d.mts.map +0 -1
- package/dist/neutral/components/SimpleCard/index.d.ts +0 -2
- package/dist/neutral/components/SimpleCard/index.d.ts.map +0 -1
- package/dist/neutral/components/SimpleCardGrid/SimpleCardGrid.d.cts +0 -7
- package/dist/neutral/components/SimpleCardGrid/SimpleCardGrid.d.cts.map +0 -1
- package/dist/neutral/components/SimpleCardGrid/SimpleCardGrid.d.mts +0 -7
- package/dist/neutral/components/SimpleCardGrid/SimpleCardGrid.d.mts.map +0 -1
- package/dist/neutral/components/SimpleCardGrid/SimpleCardGrid.d.ts +0 -7
- package/dist/neutral/components/SimpleCardGrid/SimpleCardGrid.d.ts.map +0 -1
- package/dist/neutral/components/SimpleCardGrid/index.d.cts +0 -2
- package/dist/neutral/components/SimpleCardGrid/index.d.cts.map +0 -1
- package/dist/neutral/components/SimpleCardGrid/index.d.mts +0 -2
- package/dist/neutral/components/SimpleCardGrid/index.d.mts.map +0 -1
- package/dist/neutral/components/SimpleCardGrid/index.d.ts +0 -2
- package/dist/neutral/components/SimpleCardGrid/index.d.ts.map +0 -1
- package/dist/neutral/components/index.d.cts +0 -6
- package/dist/neutral/components/index.d.cts.map +0 -1
- package/dist/neutral/components/index.d.mts +0 -6
- package/dist/neutral/components/index.d.mts.map +0 -1
- package/dist/neutral/components/index.d.ts +0 -6
- package/dist/neutral/components/index.d.ts.map +0 -1
- package/dist/neutral/index.cjs +0 -248
- package/dist/neutral/index.cjs.map +0 -1
- package/dist/neutral/index.d.cts +0 -2
- package/dist/neutral/index.d.cts.map +0 -1
- package/dist/neutral/index.d.mts +0 -2
- package/dist/neutral/index.d.mts.map +0 -1
- package/dist/neutral/index.d.ts +0 -2
- package/dist/neutral/index.d.ts.map +0 -1
- package/dist/neutral/index.js +0 -225
- package/dist/neutral/index.js.map +0 -1
- package/dist/node/components/CardContentEx.d.cts +0 -10
- package/dist/node/components/CardContentEx.d.cts.map +0 -1
- package/dist/node/components/CardContentEx.d.mts +0 -10
- package/dist/node/components/CardContentEx.d.mts.map +0 -1
- package/dist/node/components/CardContentEx.d.ts +0 -10
- package/dist/node/components/CardContentEx.d.ts.map +0 -1
- package/dist/node/components/CardEx.d.cts +0 -7
- package/dist/node/components/CardEx.d.cts.map +0 -1
- package/dist/node/components/CardEx.d.mts +0 -7
- package/dist/node/components/CardEx.d.mts.map +0 -1
- package/dist/node/components/CardEx.d.ts +0 -7
- package/dist/node/components/CardEx.d.ts.map +0 -1
- package/dist/node/components/FullWidthCard/FullWidthCard.d.cts +0 -15
- package/dist/node/components/FullWidthCard/FullWidthCard.d.cts.map +0 -1
- package/dist/node/components/FullWidthCard/FullWidthCard.d.mts +0 -15
- package/dist/node/components/FullWidthCard/FullWidthCard.d.mts.map +0 -1
- package/dist/node/components/FullWidthCard/FullWidthCard.d.ts +0 -15
- package/dist/node/components/FullWidthCard/FullWidthCard.d.ts.map +0 -1
- package/dist/node/components/FullWidthCard/index.d.cts +0 -2
- package/dist/node/components/FullWidthCard/index.d.cts.map +0 -1
- package/dist/node/components/FullWidthCard/index.d.mts +0 -2
- package/dist/node/components/FullWidthCard/index.d.mts.map +0 -1
- package/dist/node/components/FullWidthCard/index.d.ts +0 -2
- package/dist/node/components/FullWidthCard/index.d.ts.map +0 -1
- package/dist/node/components/PageCard.d.cts +0 -10
- package/dist/node/components/PageCard.d.cts.map +0 -1
- package/dist/node/components/PageCard.d.mts +0 -10
- package/dist/node/components/PageCard.d.mts.map +0 -1
- package/dist/node/components/PageCard.d.ts +0 -10
- package/dist/node/components/PageCard.d.ts.map +0 -1
- package/dist/node/components/SimpleCard/SimpleCard.d.cts +0 -16
- package/dist/node/components/SimpleCard/SimpleCard.d.cts.map +0 -1
- package/dist/node/components/SimpleCard/SimpleCard.d.mts +0 -16
- package/dist/node/components/SimpleCard/SimpleCard.d.mts.map +0 -1
- package/dist/node/components/SimpleCard/SimpleCard.d.ts +0 -16
- package/dist/node/components/SimpleCard/SimpleCard.d.ts.map +0 -1
- package/dist/node/components/SimpleCard/index.d.cts +0 -2
- package/dist/node/components/SimpleCard/index.d.cts.map +0 -1
- package/dist/node/components/SimpleCard/index.d.mts +0 -2
- package/dist/node/components/SimpleCard/index.d.mts.map +0 -1
- package/dist/node/components/SimpleCard/index.d.ts +0 -2
- package/dist/node/components/SimpleCard/index.d.ts.map +0 -1
- package/dist/node/components/SimpleCardGrid/SimpleCardGrid.d.cts +0 -7
- package/dist/node/components/SimpleCardGrid/SimpleCardGrid.d.cts.map +0 -1
- package/dist/node/components/SimpleCardGrid/SimpleCardGrid.d.mts +0 -7
- package/dist/node/components/SimpleCardGrid/SimpleCardGrid.d.mts.map +0 -1
- package/dist/node/components/SimpleCardGrid/SimpleCardGrid.d.ts +0 -7
- package/dist/node/components/SimpleCardGrid/SimpleCardGrid.d.ts.map +0 -1
- package/dist/node/components/SimpleCardGrid/index.d.cts +0 -2
- package/dist/node/components/SimpleCardGrid/index.d.cts.map +0 -1
- package/dist/node/components/SimpleCardGrid/index.d.mts +0 -2
- package/dist/node/components/SimpleCardGrid/index.d.mts.map +0 -1
- package/dist/node/components/SimpleCardGrid/index.d.ts +0 -2
- package/dist/node/components/SimpleCardGrid/index.d.ts.map +0 -1
- package/dist/node/components/index.d.cts +0 -6
- package/dist/node/components/index.d.cts.map +0 -1
- package/dist/node/components/index.d.mts +0 -6
- package/dist/node/components/index.d.mts.map +0 -1
- package/dist/node/components/index.d.ts +0 -6
- package/dist/node/components/index.d.ts.map +0 -1
- package/dist/node/index.cjs +0 -259
- package/dist/node/index.cjs.map +0 -1
- package/dist/node/index.d.cts +0 -2
- package/dist/node/index.d.cts.map +0 -1
- package/dist/node/index.d.mts +0 -2
- package/dist/node/index.d.mts.map +0 -1
- package/dist/node/index.d.ts +0 -2
- package/dist/node/index.d.ts.map +0 -1
- package/dist/node/index.js +0 -226
- package/dist/node/index.js.map +0 -1
@@ -2,7 +2,7 @@ import { ArrowForwardRounded as ArrowForwardRoundedIcon } from '@mui/icons-mater
|
|
2
2
|
import { alpha, Card, CardActions, CardContent, CardMedia, CardProps, Grid, IconButton, Typography, useTheme, Zoom } from '@mui/material'
|
3
3
|
import { FlexGrowCol } from '@xylabs/react-flexbox'
|
4
4
|
import { useIsMobile } from '@xyo-network/react-shared'
|
5
|
-
import { ReactNode, useState } from 'react'
|
5
|
+
import React, { ReactNode, useState } from 'react'
|
6
6
|
import { To, useNavigate } from 'react-router-dom'
|
7
7
|
|
8
8
|
export interface FullWidthCardProps extends CardProps {
|
@@ -23,9 +23,11 @@ export const FullWidthCard: React.FC<FullWidthCardProps> = ({ cardIsButton, desc
|
|
23
23
|
const isMobile = useIsMobile()
|
24
24
|
|
25
25
|
const localRouteChange = (to: To | undefined) => {
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
26
27
|
to ? navigate(to) : navigate('/404')
|
27
28
|
}
|
28
29
|
const externalRouteChange = (href: string | undefined) => {
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
29
31
|
href ? window.open(href) : navigate('/404')
|
30
32
|
}
|
31
33
|
|
@@ -38,38 +40,43 @@ export const FullWidthCard: React.FC<FullWidthCardProps> = ({ cardIsButton, desc
|
|
38
40
|
'&:hover': {
|
39
41
|
cursor: 'pointer',
|
40
42
|
},
|
41
|
-
backgroundColor: alpha(theme.palette.primary.light, 0.05),
|
43
|
+
'backgroundColor': alpha(theme.palette.primary.light, 0.05),
|
42
44
|
}}
|
43
45
|
onMouseEnter={() =>
|
44
|
-
isMobile
|
45
|
-
|
46
|
-
|
47
|
-
|
46
|
+
isMobile
|
47
|
+
? null
|
48
|
+
: cardIsButton
|
49
|
+
? setRaised(true)
|
50
|
+
: null}
|
48
51
|
onMouseLeave={() =>
|
49
|
-
isMobile
|
50
|
-
|
51
|
-
|
52
|
-
|
52
|
+
isMobile
|
53
|
+
? null
|
54
|
+
: cardIsButton
|
55
|
+
? setRaised(false)
|
56
|
+
: null}
|
53
57
|
onClick={() =>
|
54
|
-
cardIsButton
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
58
|
+
cardIsButton
|
59
|
+
? href
|
60
|
+
? externalRouteChange(href)
|
61
|
+
: to
|
62
|
+
? localRouteChange(to)
|
63
|
+
: navigate('/404')
|
64
|
+
: null}
|
60
65
|
>
|
61
|
-
{media
|
62
|
-
<CardMedia component="img" height="100" image={media} alt="" />
|
63
|
-
|
66
|
+
{media
|
67
|
+
? <CardMedia component="img" height="100" image={media} alt="" />
|
68
|
+
: null}
|
64
69
|
|
65
70
|
<CardContent>
|
66
71
|
<Grid container alignItems="center" paddingY={2} paddingX={2}>
|
67
72
|
<Grid item xs={12} md={6}>
|
68
|
-
{typeof name === 'string'
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
+
{typeof name === 'string'
|
74
|
+
? (
|
75
|
+
<Typography fontWeight={700} variant="h2" textAlign="left" paddingBottom={1}>
|
76
|
+
{name}
|
77
|
+
</Typography>
|
78
|
+
)
|
79
|
+
: name}
|
73
80
|
</Grid>
|
74
81
|
<Grid item xs={12} md={5}>
|
75
82
|
<Typography variant="body1" fontWeight={400} textAlign="left">
|
@@ -82,10 +89,11 @@ export const FullWidthCard: React.FC<FullWidthCardProps> = ({ cardIsButton, desc
|
|
82
89
|
color="primary"
|
83
90
|
size={small ? 'small' : 'medium'}
|
84
91
|
onClick={() =>
|
85
|
-
href
|
86
|
-
|
87
|
-
|
88
|
-
|
92
|
+
href
|
93
|
+
? externalRouteChange(href)
|
94
|
+
: to
|
95
|
+
? localRouteChange(to)
|
96
|
+
: navigate('/404')}
|
89
97
|
disableFocusRipple
|
90
98
|
disableRipple
|
91
99
|
disableTouchRipple
|
@@ -102,10 +110,11 @@ export const FullWidthCard: React.FC<FullWidthCardProps> = ({ cardIsButton, desc
|
|
102
110
|
color="primary"
|
103
111
|
size={small ? 'small' : 'medium'}
|
104
112
|
onClick={() =>
|
105
|
-
href
|
106
|
-
|
107
|
-
|
108
|
-
|
113
|
+
href
|
114
|
+
? externalRouteChange(href)
|
115
|
+
: to
|
116
|
+
? localRouteChange(to)
|
117
|
+
: navigate('/404')}
|
109
118
|
disableFocusRipple
|
110
119
|
disableRipple
|
111
120
|
disableTouchRipple
|
@@ -1 +1 @@
|
|
1
|
-
export * from './FullWidthCard.
|
1
|
+
export * from './FullWidthCard.tsx'
|
@@ -1,10 +1,9 @@
|
|
1
|
-
/* eslint-disable import/no-internal-modules */
|
2
1
|
import { CardContent, Typography } from '@mui/material'
|
3
2
|
import { Meta, StoryFn } from '@storybook/react'
|
4
3
|
import { WithRefDecorator } from '@xyo-network/react-storybook'
|
5
|
-
import { useState } from 'react'
|
4
|
+
import React, { useState } from 'react'
|
6
5
|
|
7
|
-
import { PageCard } from './PageCard.
|
6
|
+
import { PageCard } from './PageCard.tsx'
|
8
7
|
|
9
8
|
const StorybookEntry: Meta = {
|
10
9
|
argTypes: {
|
@@ -29,7 +28,10 @@ const Template: StoryFn<typeof PageCard> = (props) => {
|
|
29
28
|
<PageCard title="Page Card" subheader="subheader" onRefresh={() => setRefreshedValue(Math.random())} {...props}>
|
30
29
|
<CardContent>
|
31
30
|
<Typography variant="body1">Page Card Content</Typography>
|
32
|
-
<Typography variant="body1">
|
31
|
+
<Typography variant="body1">
|
32
|
+
Refreshed Value:
|
33
|
+
{refreshedValue?.toString()}
|
34
|
+
</Typography>
|
33
35
|
</CardContent>
|
34
36
|
</PageCard>
|
35
37
|
)
|
@@ -62,5 +64,4 @@ WithRef.decorators = [WithRefDecorator]
|
|
62
64
|
|
63
65
|
export { Default, WithNoOnRefresh, WithRef }
|
64
66
|
|
65
|
-
// eslint-disable-next-line import/no-default-export
|
66
67
|
export default StorybookEntry
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { Refresh as RefreshIcon } from '@mui/icons-material'
|
2
2
|
import { CardHeader, CardHeaderProps, IconButton } from '@mui/material'
|
3
3
|
import { TypographyEx } from '@xyo-network/react-shared'
|
4
|
-
import { forwardRef, ReactNode } from 'react'
|
4
|
+
import React, { forwardRef, ReactNode } from 'react'
|
5
5
|
|
6
|
-
import { CardEx, CardExProps } from './CardEx.
|
6
|
+
import { CardEx, CardExProps } from './CardEx.tsx'
|
7
7
|
|
8
8
|
export interface PageCardProps extends CardExProps {
|
9
9
|
action?: ReactNode
|
@@ -15,20 +15,22 @@ const PageCardWithRef = forwardRef<HTMLDivElement, PageCardProps>(({ subheader,
|
|
15
15
|
return (
|
16
16
|
<CardEx style={{ backgroundColor: 'transparent', position: 'relative', ...style }} elevation={0} ref={ref} {...props}>
|
17
17
|
<CardHeader
|
18
|
-
title={
|
18
|
+
title={(
|
19
19
|
<TypographyEx variant="h5" gutterBottom>
|
20
20
|
{title}
|
21
21
|
</TypographyEx>
|
22
|
-
}
|
22
|
+
)}
|
23
23
|
subheader={<TypographyEx variant="subtitle1">{subheader}</TypographyEx>}
|
24
24
|
action={
|
25
25
|
action ?? (
|
26
26
|
<>
|
27
|
-
{onRefresh
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
{onRefresh
|
28
|
+
? (
|
29
|
+
<IconButton onClick={() => onRefresh?.()}>
|
30
|
+
<RefreshIcon />
|
31
|
+
</IconButton>
|
32
|
+
)
|
33
|
+
: null}
|
32
34
|
</>
|
33
35
|
)
|
34
36
|
}
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import { Grid } from '@mui/material'
|
2
2
|
import { Meta, StoryFn } from '@storybook/react'
|
3
|
+
import React from 'react'
|
3
4
|
import { BrowserRouter } from 'react-router-dom'
|
4
5
|
|
5
6
|
import CoinbaseWalletIcon from './coinbase-wallet.svg'
|
6
7
|
import MoneyMedia from './money.jpg'
|
7
|
-
import { SimpleCard } from './SimpleCard.
|
8
|
+
import { SimpleCard } from './SimpleCard.tsx'
|
8
9
|
const StorybookEntry = {
|
9
10
|
argTypes: {},
|
10
11
|
component: SimpleCard,
|
@@ -16,7 +17,7 @@ const StorybookEntry = {
|
|
16
17
|
title: 'shared/SimpleCard',
|
17
18
|
} as Meta<typeof SimpleCard>
|
18
19
|
|
19
|
-
const Template: StoryFn<typeof SimpleCard> =
|
20
|
+
const Template: StoryFn<typeof SimpleCard> = args => (
|
20
21
|
<BrowserRouter>
|
21
22
|
<Grid container spacing={2}>
|
22
23
|
<Grid item xs={12} sm={6} md={3}>
|
@@ -80,9 +81,8 @@ CardWithAllParameters.args = {
|
|
80
81
|
}
|
81
82
|
|
82
83
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
83
|
-
|
84
|
+
// @ts-ignore
|
84
85
|
|
85
86
|
export { CardWithAllParameters, Default, DefaultMediaCard, DefaultSmallCard, DefaultWithImage, VariantButton }
|
86
87
|
|
87
|
-
// eslint-disable-next-line import/no-default-export
|
88
88
|
export default StorybookEntry
|
@@ -2,10 +2,10 @@ import { ArrowForwardRounded as ArrowForwardRoundedIcon } from '@mui/icons-mater
|
|
2
2
|
import { alpha, CardActions, CardContent, CardMedia, IconButton, Typography, useTheme } from '@mui/material'
|
3
3
|
import { FlexCol, FlexGrowCol } from '@xylabs/react-flexbox'
|
4
4
|
import { useIsMobile } from '@xyo-network/react-shared'
|
5
|
-
import { ReactNode, useState } from 'react'
|
5
|
+
import React, { ReactNode, useState } from 'react'
|
6
6
|
import { To, useNavigate } from 'react-router-dom'
|
7
7
|
|
8
|
-
import { CardEx, CardExProps } from '../CardEx.
|
8
|
+
import { CardEx, CardExProps } from '../CardEx.tsx'
|
9
9
|
|
10
10
|
export interface SimpleCardProps extends CardExProps {
|
11
11
|
desc?: ReactNode
|
@@ -37,9 +37,11 @@ export const SimpleCard: React.FC<SimpleCardProps> = ({
|
|
37
37
|
const navigate = useNavigate()
|
38
38
|
const isMobile = useIsMobile()
|
39
39
|
const localRouteChange = (to: To | undefined) => {
|
40
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
40
41
|
to ? navigate(to) : navigate('/404')
|
41
42
|
}
|
42
43
|
const externalRouteChange = (href: string | undefined) => {
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
43
45
|
href ? window.open(href) : navigate('/404')
|
44
46
|
}
|
45
47
|
return (
|
@@ -49,72 +51,82 @@ export const SimpleCard: React.FC<SimpleCardProps> = ({
|
|
49
51
|
'&:hover': {
|
50
52
|
cursor: interactionVariant == 'button' ? 'pointer' : null,
|
51
53
|
},
|
52
|
-
backgroundColor: alpha(theme.palette.primary.light, 0.05),
|
54
|
+
'backgroundColor': alpha(theme.palette.primary.light, 0.05),
|
53
55
|
...sx,
|
54
56
|
}}
|
55
57
|
onMouseEnter={() =>
|
56
|
-
isMobile
|
57
|
-
|
58
|
-
|
59
|
-
|
58
|
+
isMobile
|
59
|
+
? null
|
60
|
+
: interactionVariant == 'button'
|
61
|
+
? setRaised(true)
|
62
|
+
: null}
|
60
63
|
onMouseLeave={() =>
|
61
|
-
isMobile
|
62
|
-
|
63
|
-
|
64
|
-
|
64
|
+
isMobile
|
65
|
+
? null
|
66
|
+
: interactionVariant == 'button'
|
67
|
+
? setRaised(false)
|
68
|
+
: null}
|
65
69
|
onClick={() =>
|
66
|
-
interactionVariant == 'button'
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
70
|
+
interactionVariant == 'button'
|
71
|
+
? href
|
72
|
+
? externalRouteChange(href)
|
73
|
+
: to
|
74
|
+
? localRouteChange(to)
|
75
|
+
: navigate('/404')
|
76
|
+
: null}
|
72
77
|
{...props}
|
73
78
|
>
|
74
|
-
{media
|
75
|
-
<CardMedia component="img" height="100" image={media} alt="" />
|
76
|
-
|
79
|
+
{media
|
80
|
+
? <CardMedia component="img" height="100" image={media} alt="" />
|
81
|
+
: null}
|
77
82
|
|
78
83
|
<CardContent sx={{ height: '100%' }}>
|
79
84
|
<FlexCol width="100%" alignItems="flex-start">
|
80
|
-
{iconImage
|
81
|
-
<img src={iconImage} height="40px" style={{ paddingBottom: '8px' }} />
|
82
|
-
|
83
|
-
{typeof headline === 'string'
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
85
|
+
{iconImage
|
86
|
+
? <img src={iconImage} height="40px" style={{ paddingBottom: '8px' }} />
|
87
|
+
: null}
|
88
|
+
{typeof headline === 'string'
|
89
|
+
? (
|
90
|
+
<Typography variant={small ? 'body1' : 'h6'} textAlign="left" gutterBottom>
|
91
|
+
{headline}
|
92
|
+
</Typography>
|
93
|
+
)
|
94
|
+
: headline}
|
95
|
+
{subtitle
|
96
|
+
? (
|
97
|
+
<Typography variant="subtitle2" textAlign="left" gutterBottom>
|
98
|
+
{subtitle}
|
99
|
+
</Typography>
|
100
|
+
)
|
101
|
+
: null}
|
93
102
|
<Typography variant={small ? 'caption' : 'body1'} textAlign="left" gutterBottom>
|
94
103
|
{desc}
|
95
104
|
</Typography>
|
96
105
|
</FlexCol>
|
97
106
|
</CardContent>
|
98
|
-
{interactionVariant == 'button'
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
107
|
+
{interactionVariant == 'button'
|
108
|
+
? (
|
109
|
+
<CardActions>
|
110
|
+
<FlexGrowCol alignItems="flex-end">
|
111
|
+
<IconButton
|
112
|
+
color={raised ? 'secondary' : 'primary'}
|
113
|
+
size={small ? 'small' : 'medium'}
|
114
|
+
onClick={() =>
|
115
|
+
href
|
116
|
+
? externalRouteChange(href)
|
117
|
+
: to
|
118
|
+
? localRouteChange(to)
|
119
|
+
: navigate('/404')}
|
120
|
+
disableFocusRipple
|
121
|
+
disableRipple
|
122
|
+
disableTouchRipple
|
123
|
+
>
|
124
|
+
<ArrowForwardRoundedIcon fontSize={small ? 'small' : 'medium'} />
|
125
|
+
</IconButton>
|
126
|
+
</FlexGrowCol>
|
127
|
+
</CardActions>
|
128
|
+
)
|
129
|
+
: null}
|
118
130
|
</CardEx>
|
119
131
|
)
|
120
132
|
}
|
@@ -1 +1 @@
|
|
1
|
-
export * from './SimpleCard.
|
1
|
+
export * from './SimpleCard.tsx'
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import { Meta, StoryFn } from '@storybook/react'
|
2
|
+
import React from 'react'
|
2
3
|
import { BrowserRouter } from 'react-router-dom'
|
3
4
|
|
4
5
|
import CoinbaseWalletIcon from './coinbase-wallet.svg'
|
5
6
|
import MoneyMedia from './money.jpg'
|
6
|
-
import { SimpleCardGrid } from './SimpleCardGrid.
|
7
|
+
import { SimpleCardGrid } from './SimpleCardGrid.tsx'
|
7
8
|
const StorybookEntry = {
|
8
9
|
argTypes: {},
|
9
10
|
component: SimpleCardGrid,
|
@@ -15,7 +16,7 @@ const StorybookEntry = {
|
|
15
16
|
title: 'shared/SimpleCardGrid',
|
16
17
|
} as Meta<typeof SimpleCardGrid>
|
17
18
|
|
18
|
-
const Template: StoryFn<typeof SimpleCardGrid> =
|
19
|
+
const Template: StoryFn<typeof SimpleCardGrid> = args => (
|
19
20
|
<BrowserRouter>
|
20
21
|
<SimpleCardGrid {...args}></SimpleCardGrid>
|
21
22
|
</BrowserRouter>
|
@@ -69,9 +70,8 @@ Default.args = {
|
|
69
70
|
}
|
70
71
|
|
71
72
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
72
|
-
|
73
|
+
// @ts-ignore
|
73
74
|
|
74
75
|
export { Default }
|
75
76
|
|
76
|
-
// eslint-disable-next-line import/no-default-export
|
77
77
|
export default StorybookEntry
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { Grid, GridProps } from '@mui/material'
|
2
|
+
import React from 'react'
|
2
3
|
|
3
|
-
import { SimpleCard, SimpleCardProps } from '../SimpleCard/index.
|
4
|
+
import { SimpleCard, SimpleCardProps } from '../SimpleCard/index.ts'
|
4
5
|
|
5
6
|
export interface SimpleCardGridProps extends GridProps {
|
6
7
|
cards?: SimpleCardProps[]
|
@@ -1 +1 @@
|
|
1
|
-
export * from './SimpleCardGrid.
|
1
|
+
export * from './SimpleCardGrid.tsx'
|
package/src/components/index.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
export * from './CardContentEx.
|
2
|
-
export * from './CardEx.
|
3
|
-
export * from './FullWidthCard/index.
|
4
|
-
export * from './PageCard.
|
5
|
-
export * from './SimpleCard/index.
|
1
|
+
export * from './CardContentEx.tsx'
|
2
|
+
export * from './CardEx.tsx'
|
3
|
+
export * from './FullWidthCard/index.ts'
|
4
|
+
export * from './PageCard.tsx'
|
5
|
+
export * from './SimpleCard/index.ts'
|
package/src/index.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export * from './components/index.
|
1
|
+
export * from './components/index.ts'
|
package/xy.config.ts
ADDED
@@ -1,10 +0,0 @@
|
|
1
|
-
import { CardContentProps } from '@mui/material';
|
2
|
-
export type CardContentExProps = CardContentProps & {
|
3
|
-
refreshRef?: number;
|
4
|
-
removePadding?: boolean;
|
5
|
-
scrollToTop?: number;
|
6
|
-
variant?: 'scrollable' | 'normal';
|
7
|
-
};
|
8
|
-
export declare const CardContentExWithRef: import("react").ForwardRefExoticComponent<Omit<CardContentExProps, "ref"> & import("react").RefAttributes<HTMLDivElement | null>>;
|
9
|
-
export declare const CardContentEx: import("react").ForwardRefExoticComponent<Omit<CardContentExProps, "ref"> & import("react").RefAttributes<HTMLDivElement | null>>;
|
10
|
-
//# sourceMappingURL=CardContentEx.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CardContentEx.d.ts","sourceRoot":"","sources":["../../../src/components/CardContentEx.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,gBAAgB,EAAU,MAAM,eAAe,CAAA;AAmBrE,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,GAAG;IAClD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,YAAY,GAAG,QAAQ,CAAA;CAClC,CAAA;AAED,eAAO,MAAM,oBAAoB,mIAU/B,CAAA;AAIF,eAAO,MAAM,aAAa,mIAAuB,CAAA"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { CardContentProps } from '@mui/material';
|
2
|
-
export type CardContentExProps = CardContentProps & {
|
3
|
-
refreshRef?: number;
|
4
|
-
removePadding?: boolean;
|
5
|
-
scrollToTop?: number;
|
6
|
-
variant?: 'scrollable' | 'normal';
|
7
|
-
};
|
8
|
-
export declare const CardContentExWithRef: import("react").ForwardRefExoticComponent<Omit<CardContentExProps, "ref"> & import("react").RefAttributes<HTMLDivElement | null>>;
|
9
|
-
export declare const CardContentEx: import("react").ForwardRefExoticComponent<Omit<CardContentExProps, "ref"> & import("react").RefAttributes<HTMLDivElement | null>>;
|
10
|
-
//# sourceMappingURL=CardContentEx.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CardContentEx.d.ts","sourceRoot":"","sources":["../../../src/components/CardContentEx.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,gBAAgB,EAAU,MAAM,eAAe,CAAA;AAmBrE,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,GAAG;IAClD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,YAAY,GAAG,QAAQ,CAAA;CAClC,CAAA;AAED,eAAO,MAAM,oBAAoB,mIAU/B,CAAA;AAIF,eAAO,MAAM,aAAa,mIAAuB,CAAA"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { CardContentProps } from '@mui/material';
|
2
|
-
export type CardContentExProps = CardContentProps & {
|
3
|
-
refreshRef?: number;
|
4
|
-
removePadding?: boolean;
|
5
|
-
scrollToTop?: number;
|
6
|
-
variant?: 'scrollable' | 'normal';
|
7
|
-
};
|
8
|
-
export declare const CardContentExWithRef: import("react").ForwardRefExoticComponent<Omit<CardContentExProps, "ref"> & import("react").RefAttributes<HTMLDivElement | null>>;
|
9
|
-
export declare const CardContentEx: import("react").ForwardRefExoticComponent<Omit<CardContentExProps, "ref"> & import("react").RefAttributes<HTMLDivElement | null>>;
|
10
|
-
//# sourceMappingURL=CardContentEx.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CardContentEx.d.ts","sourceRoot":"","sources":["../../../src/components/CardContentEx.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,gBAAgB,EAAU,MAAM,eAAe,CAAA;AAmBrE,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,GAAG;IAClD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,YAAY,GAAG,QAAQ,CAAA;CAClC,CAAA;AAED,eAAO,MAAM,oBAAoB,mIAU/B,CAAA;AAIF,eAAO,MAAM,aAAa,mIAAuB,CAAA"}
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import { CardProps } from '@mui/material';
|
2
|
-
export interface CardExProps extends CardProps {
|
3
|
-
gradient?: 'border' | 'background';
|
4
|
-
}
|
5
|
-
export declare const CardExWithRef: import("react").ForwardRefExoticComponent<Omit<CardExProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
6
|
-
export declare const CardEx: import("react").ForwardRefExoticComponent<Omit<CardExProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
7
|
-
//# sourceMappingURL=CardEx.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CardEx.d.ts","sourceRoot":"","sources":["../../../src/components/CardEx.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,SAAS,EAAE,MAAM,eAAe,CAAA;AAI/C,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,QAAQ,CAAC,EAAE,QAAQ,GAAG,YAAY,CAAA;CACnC;AAED,eAAO,MAAM,aAAa,qHAgBxB,CAAA;AAIF,eAAO,MAAM,MAAM,qHAAgB,CAAA"}
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import { CardProps } from '@mui/material';
|
2
|
-
export interface CardExProps extends CardProps {
|
3
|
-
gradient?: 'border' | 'background';
|
4
|
-
}
|
5
|
-
export declare const CardExWithRef: import("react").ForwardRefExoticComponent<Omit<CardExProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
6
|
-
export declare const CardEx: import("react").ForwardRefExoticComponent<Omit<CardExProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
7
|
-
//# sourceMappingURL=CardEx.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CardEx.d.ts","sourceRoot":"","sources":["../../../src/components/CardEx.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,SAAS,EAAE,MAAM,eAAe,CAAA;AAI/C,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,QAAQ,CAAC,EAAE,QAAQ,GAAG,YAAY,CAAA;CACnC;AAED,eAAO,MAAM,aAAa,qHAgBxB,CAAA;AAIF,eAAO,MAAM,MAAM,qHAAgB,CAAA"}
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import { CardProps } from '@mui/material';
|
2
|
-
export interface CardExProps extends CardProps {
|
3
|
-
gradient?: 'border' | 'background';
|
4
|
-
}
|
5
|
-
export declare const CardExWithRef: import("react").ForwardRefExoticComponent<Omit<CardExProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
6
|
-
export declare const CardEx: import("react").ForwardRefExoticComponent<Omit<CardExProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
7
|
-
//# sourceMappingURL=CardEx.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CardEx.d.ts","sourceRoot":"","sources":["../../../src/components/CardEx.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,SAAS,EAAE,MAAM,eAAe,CAAA;AAI/C,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,QAAQ,CAAC,EAAE,QAAQ,GAAG,YAAY,CAAA;CACnC;AAED,eAAO,MAAM,aAAa,qHAgBxB,CAAA;AAIF,eAAO,MAAM,MAAM,qHAAgB,CAAA"}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import { CardProps } from '@mui/material';
|
2
|
-
import { ReactNode } from 'react';
|
3
|
-
import { To } from 'react-router-dom';
|
4
|
-
export interface FullWidthCardProps extends CardProps {
|
5
|
-
cardIsButton?: boolean;
|
6
|
-
desc?: ReactNode;
|
7
|
-
href?: string;
|
8
|
-
linkText?: string;
|
9
|
-
media?: string;
|
10
|
-
name: ReactNode;
|
11
|
-
small?: boolean;
|
12
|
-
to?: To;
|
13
|
-
}
|
14
|
-
export declare const FullWidthCard: React.FC<FullWidthCardProps>;
|
15
|
-
//# sourceMappingURL=FullWidthCard.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"FullWidthCard.d.ts","sourceRoot":"","sources":["../../../../src/components/FullWidthCard/FullWidthCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoD,SAAS,EAAgD,MAAM,eAAe,CAAA;AAGzI,OAAO,EAAE,SAAS,EAAY,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,EAAE,EAAe,MAAM,kBAAkB,CAAA;AAElD,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,SAAS,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,EAAE,CAAC,EAAE,EAAE,CAAA;CACR;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAoGtD,CAAA"}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import { CardProps } from '@mui/material';
|
2
|
-
import { ReactNode } from 'react';
|
3
|
-
import { To } from 'react-router-dom';
|
4
|
-
export interface FullWidthCardProps extends CardProps {
|
5
|
-
cardIsButton?: boolean;
|
6
|
-
desc?: ReactNode;
|
7
|
-
href?: string;
|
8
|
-
linkText?: string;
|
9
|
-
media?: string;
|
10
|
-
name: ReactNode;
|
11
|
-
small?: boolean;
|
12
|
-
to?: To;
|
13
|
-
}
|
14
|
-
export declare const FullWidthCard: React.FC<FullWidthCardProps>;
|
15
|
-
//# sourceMappingURL=FullWidthCard.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"FullWidthCard.d.ts","sourceRoot":"","sources":["../../../../src/components/FullWidthCard/FullWidthCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoD,SAAS,EAAgD,MAAM,eAAe,CAAA;AAGzI,OAAO,EAAE,SAAS,EAAY,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,EAAE,EAAe,MAAM,kBAAkB,CAAA;AAElD,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,SAAS,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,EAAE,CAAC,EAAE,EAAE,CAAA;CACR;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAoGtD,CAAA"}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import { CardProps } from '@mui/material';
|
2
|
-
import { ReactNode } from 'react';
|
3
|
-
import { To } from 'react-router-dom';
|
4
|
-
export interface FullWidthCardProps extends CardProps {
|
5
|
-
cardIsButton?: boolean;
|
6
|
-
desc?: ReactNode;
|
7
|
-
href?: string;
|
8
|
-
linkText?: string;
|
9
|
-
media?: string;
|
10
|
-
name: ReactNode;
|
11
|
-
small?: boolean;
|
12
|
-
to?: To;
|
13
|
-
}
|
14
|
-
export declare const FullWidthCard: React.FC<FullWidthCardProps>;
|
15
|
-
//# sourceMappingURL=FullWidthCard.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"FullWidthCard.d.ts","sourceRoot":"","sources":["../../../../src/components/FullWidthCard/FullWidthCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoD,SAAS,EAAgD,MAAM,eAAe,CAAA;AAGzI,OAAO,EAAE,SAAS,EAAY,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,EAAE,EAAe,MAAM,kBAAkB,CAAA;AAElD,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,SAAS,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,EAAE,CAAC,EAAE,EAAE,CAAA;CACR;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAoGtD,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/FullWidthCard/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/FullWidthCard/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
|