norma-library 0.6.85 → 0.6.87
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/.storybook/main.ts +7 -0
- package/dist/esm/components/Box/interfaces.d.ts +1 -0
- package/dist/esm/components/Breadcrumb/index.d.ts +2 -2
- package/dist/esm/components/Breadcrumb/index.js +13 -9
- package/dist/esm/components/Breadcrumb/index.js.map +1 -1
- package/dist/esm/components/Breadcrumb/interface.d.ts +11 -6
- package/dist/esm/components/Breadcrumb/styles.d.ts +3 -3
- package/dist/esm/components/Breadcrumb/styles.js +3 -3
- package/dist/esm/components/Breadcrumb/styles.js.map +1 -1
- package/dist/esm/components/Icons.js +6 -7
- package/dist/esm/components/Icons.js.map +1 -1
- package/dist/esm/components/ProductCard/ProductCard.js +13 -11
- package/dist/esm/components/ProductCard/ProductCard.js.map +1 -1
- package/dist/esm/components/ProductCard/ProductCard.style.js +2 -2
- package/dist/esm/components/ProductCard/ProductCard.style.js.map +1 -1
- package/dist/esm/components/ServiceCard/ServiceCard.js +6 -6
- package/dist/esm/components/ServiceCard/ServiceCard.js.map +1 -1
- package/dist/esm/components/ServiceCard/ServiceCard.style.js +1 -1
- package/dist/esm/components/ServiceCard/ServiceCard.style.js.map +1 -1
- package/dist/esm/components/Svgs.d.ts +12 -0
- package/dist/esm/components/Svgs.js +36 -0
- package/dist/esm/components/Svgs.js.map +1 -1
- package/dist/esm/components/Typography/Text/interfaces.d.ts +1 -0
- package/dist/esm/components/Typography/Title/interfaces.d.ts +1 -0
- package/dist/esm/hooks/useClickOutside.d.ts +1 -1
- package/dist/esm/hooks/useClickOutside.js.map +1 -1
- package/dist/esm/interfaces/Icons.d.ts +4 -3
- package/dist/esm/interfaces/ProductCard.d.ts +15 -5
- package/dist/esm/interfaces/ServiceCard.d.ts +12 -4
- package/dist/esm/types/index.d.ts +3 -3
- package/dist/esm/types/index.js.map +1 -1
- package/package.json +24 -26
- package/src/components/Box/interfaces.ts +2 -0
- package/src/components/Breadcrumb/index.tsx +16 -11
- package/src/components/Breadcrumb/interface.ts +12 -6
- package/src/components/Breadcrumb/styles.tsx +10 -11
- package/src/components/Icons.tsx +12 -8
- package/src/components/ProductCard/ProductCard.style.ts +5 -2
- package/src/components/ProductCard/ProductCard.tsx +27 -27
- package/src/components/ServiceCard/ServiceCard.style.ts +0 -1
- package/src/components/ServiceCard/ServiceCard.tsx +6 -6
- package/src/components/Svgs.tsx +224 -2
- package/src/components/Typography/Text/interfaces.ts +3 -1
- package/src/components/Typography/Title/interfaces.ts +2 -0
- package/src/hooks/useClickOutside.tsx +1 -1
- package/src/index.ts +0 -2
- package/src/interfaces/Icons.ts +4 -3
- package/src/interfaces/ProductCard.ts +29 -20
- package/src/interfaces/ServiceCard.ts +19 -10
- package/src/stories/Accordion.stories.tsx +19 -19
- package/src/stories/Avatar.stories.tsx +32 -28
- package/src/stories/Badge.stories.tsx +17 -15
- package/src/stories/Box.stories.tsx +16 -12
- package/src/stories/Breadcrumb.stories.tsx +62 -18
- package/src/stories/Button.stories.tsx +24 -16
- package/src/stories/Card.stories.tsx +21 -13
- package/src/stories/ChatMessage.stories.tsx +10 -9
- package/src/stories/ChatMessageBalloon.stories.tsx +83 -66
- package/src/stories/CheckBox.stories.tsx +23 -23
- package/src/stories/DateInput.stories.tsx +15 -16
- package/src/stories/DatePicker.stories.tsx +17 -12
- package/src/stories/DropDown.stories.tsx +16 -16
- package/src/stories/IconButton.stories.tsx +45 -21
- package/src/stories/Modal.stories.tsx +49 -49
- package/src/stories/ModalStatus.stories.tsx +34 -18
- package/src/stories/MultiSelectInput.stories.tsx +30 -28
- package/src/stories/NormaChatMessageBalloon.stories.tsx +119 -82
- package/src/stories/Paper.stories.tsx +14 -14
- package/src/stories/ProductCard.stories.tsx +78 -9
- package/src/stories/ProgressBar.stories.tsx +27 -19
- package/src/stories/RadioGroup.stories.tsx +28 -21
- package/src/stories/RangerSlider.stories.tsx +43 -35
- package/src/stories/Select.stories.tsx +61 -33
- package/src/stories/SelectInput.stories.tsx +27 -25
- package/src/stories/ServiceCard.stories.tsx +43 -15
- package/src/stories/Table.stories.tsx +211 -276
- package/src/stories/Tabs.stories.tsx +17 -17
- package/src/stories/Tag.stories.tsx +22 -14
- package/src/stories/Text.stories.tsx +9 -9
- package/src/stories/TextField.stories.tsx +116 -35
- package/src/stories/TextInput.stories.tsx +14 -15
- package/src/stories/TimeLine.stories.tsx +22 -20
- package/src/stories/TimePicker.stories.tsx +54 -30
- package/src/stories/Title.stories.tsx +9 -9
- package/src/stories/UncontrolledTable.stories.tsx +196 -66
- package/src/stories/UncontrolledTabs.stories.tsx +28 -23
- package/src/types/index.ts +4 -3
- package/src/components/IconifyIcon.tsx +0 -25
- package/src/stories/IconifyIcon.stories.tsx +0 -31
- /package/src/stories/{Colors.stories.mdx → Colors.mdx} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "norma-library",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.87",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Olos/Norma-DS. Design System based on Material UI, developed with TypeScript and Styled Components to create reusable and consistent components in web applications.",
|
|
6
6
|
"scripts": {
|
|
@@ -33,21 +33,20 @@
|
|
|
33
33
|
"@babel/preset-typescript": "^7.22.15",
|
|
34
34
|
"@emotion/core": "^11.0.0",
|
|
35
35
|
"@emotion/styled-base": "^11.0.0",
|
|
36
|
-
"@iconify/react": "^5.2.0",
|
|
37
36
|
"@mdx-js/loader": "^2.3.0",
|
|
38
|
-
"@storybook/addon-essentials": "^
|
|
39
|
-
"@storybook/addon-interactions": "^
|
|
40
|
-
"@storybook/addon-links": "^
|
|
41
|
-
"@storybook/addon-onboarding": "^
|
|
37
|
+
"@storybook/addon-essentials": "^8.5.6",
|
|
38
|
+
"@storybook/addon-interactions": "^8.5.6",
|
|
39
|
+
"@storybook/addon-links": "^8.5.6",
|
|
40
|
+
"@storybook/addon-onboarding": "^8.5.6",
|
|
42
41
|
"@storybook/addon-styling": "^1.3.7",
|
|
43
|
-
"@storybook/blocks": "^
|
|
44
|
-
"@storybook/react": "^
|
|
45
|
-
"@storybook/react-vite": "^
|
|
46
|
-
"@storybook/react-webpack5": "^
|
|
47
|
-
"@storybook/
|
|
48
|
-
"@types/react": "^
|
|
49
|
-
"@types/react-datepicker": "^
|
|
50
|
-
"@types/react-dom": "^
|
|
42
|
+
"@storybook/blocks": "^8.5.6",
|
|
43
|
+
"@storybook/react": "^8.5.6",
|
|
44
|
+
"@storybook/react-vite": "^8.5.6",
|
|
45
|
+
"@storybook/react-webpack5": "^8.5.6",
|
|
46
|
+
"@storybook/test": "^8.5.6",
|
|
47
|
+
"@types/react": "^19.0.0",
|
|
48
|
+
"@types/react-datepicker": "^7.0.0",
|
|
49
|
+
"@types/react-dom": "^19.0.0",
|
|
51
50
|
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
52
51
|
"@typescript-eslint/parser": "^6.0.0",
|
|
53
52
|
"@vitejs/plugin-react": "^4.0.3",
|
|
@@ -61,17 +60,17 @@
|
|
|
61
60
|
"eslint": "^8.45.0",
|
|
62
61
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
63
62
|
"eslint-plugin-react-refresh": "^0.4.3",
|
|
64
|
-
"eslint-plugin-storybook": "^0.
|
|
63
|
+
"eslint-plugin-storybook": "^0.11.2",
|
|
65
64
|
"git-cz": "^4.9.0",
|
|
66
65
|
"lint-staged": "^14.0.1",
|
|
67
66
|
"path": "^0.12.7",
|
|
68
67
|
"postcss": "^8.4.29",
|
|
69
68
|
"postcss-prettify": "^0.3.4",
|
|
70
|
-
"react": "^
|
|
71
|
-
"react-dom": "^
|
|
69
|
+
"react": "^19.0.0",
|
|
70
|
+
"react-dom": "^19.0.0",
|
|
72
71
|
"rimraf": "^5.0.5",
|
|
73
|
-
"storybook": "^
|
|
74
|
-
"storybook-dark-mode": "^
|
|
72
|
+
"storybook": "^8.5.6",
|
|
73
|
+
"storybook-dark-mode": "^4.0.2",
|
|
75
74
|
"style-loader": "^3.3.3",
|
|
76
75
|
"tsconfig-paths-webpack-plugin": "^4.1.0",
|
|
77
76
|
"typescript": "^5.0.2",
|
|
@@ -93,25 +92,24 @@
|
|
|
93
92
|
"@dnd-kit/core": "^6.3.1",
|
|
94
93
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
95
94
|
"@dnd-kit/sortable": "^10.0.0",
|
|
96
|
-
"@emotion/react": "^11.
|
|
95
|
+
"@emotion/react": "^11.14.0",
|
|
97
96
|
"@emotion/styled": "^11.11.0",
|
|
98
97
|
"@mui/icons-material": "^5.14.9",
|
|
99
98
|
"@mui/lab": "^5.0.0-alpha.152",
|
|
100
99
|
"@mui/material": "^5.16.7",
|
|
101
|
-
"@mui/x-date-pickers": "^
|
|
102
|
-
"@storybook/addon-mdx-gfm": "^
|
|
100
|
+
"@mui/x-date-pickers": "^7.26.0",
|
|
101
|
+
"@storybook/addon-mdx-gfm": "^8.5.6",
|
|
103
102
|
"@tanstack/react-table": "^8.10.7",
|
|
104
103
|
"dayjs": "^1.11.9",
|
|
105
104
|
"react-datepicker": "^7.5.0",
|
|
106
|
-
"react-i18next": "^
|
|
105
|
+
"react-i18next": "^15.4.0",
|
|
107
106
|
"react-select": "^5.8.0",
|
|
108
107
|
"styled-components": "^6.1.0",
|
|
109
108
|
"tslib": "^2.6.2"
|
|
110
109
|
},
|
|
111
110
|
"peerDependencies": {
|
|
112
|
-
"react": "^17.0.0 || ^18.0.0",
|
|
113
|
-
"react-dom": "^17.0.0 || ^18.0.0"
|
|
114
|
-
"@iconify/react": "^5.2.0"
|
|
111
|
+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
112
|
+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
115
113
|
},
|
|
116
114
|
"browserslist": {
|
|
117
115
|
"production": [
|
|
@@ -1,25 +1,30 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import * as S from "./styles"
|
|
3
|
-
import {
|
|
3
|
+
import { BreadCrumbProps, Item } from './interface';
|
|
4
|
+
import { Icons } from '../Icons';
|
|
5
|
+
import { Home } from '@mui/icons-material';
|
|
4
6
|
|
|
5
|
-
const Breadcrumb:React.FC<
|
|
6
|
-
const
|
|
7
|
-
return
|
|
7
|
+
const Breadcrumb: React.FC<BreadCrumbProps> = ({ items, onHomeClick, onPathClick }) => {
|
|
8
|
+
const listItems = useMemo(() => {
|
|
9
|
+
return items.map((item: Item, index: number, self: Item[]) => {
|
|
8
10
|
const showIcon = self.length > index + 1
|
|
11
|
+
const isFixedIcon = items[0] === item
|
|
9
12
|
return (
|
|
10
|
-
<div className='content' key={index}>
|
|
11
|
-
<
|
|
12
|
-
{
|
|
13
|
+
<div className='content' key={index} onClick={(event) => items[0] === item ? onHomeClick(event) : onPathClick(item, event)}>
|
|
14
|
+
{isFixedIcon && <Icons icon={Home} />}
|
|
15
|
+
{!isFixedIcon && item.icon && <Icons icon={item.icon} color='inherit' />}
|
|
16
|
+
<S.Item>{item.label}</S.Item>
|
|
17
|
+
{showIcon && <S.Divisor>/</S.Divisor>}
|
|
13
18
|
</div>
|
|
14
19
|
)
|
|
15
20
|
})
|
|
16
|
-
}, [
|
|
21
|
+
}, [items])
|
|
17
22
|
|
|
18
23
|
return (
|
|
19
24
|
<S.Container>
|
|
20
|
-
<S.
|
|
21
|
-
{
|
|
22
|
-
</S.
|
|
25
|
+
<S.ListItems>
|
|
26
|
+
{listItems}
|
|
27
|
+
</S.ListItems>
|
|
23
28
|
</S.Container>
|
|
24
29
|
)
|
|
25
30
|
}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { IconType } from "../../types";
|
|
2
|
+
import { SvgIconComponent } from "@mui/icons-material";
|
|
3
|
+
|
|
4
|
+
export interface Item {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
href: string;
|
|
8
|
+
icon?: SvgIconComponent | IconType;
|
|
4
9
|
}
|
|
5
10
|
|
|
6
|
-
export interface
|
|
7
|
-
|
|
8
|
-
|
|
11
|
+
export interface BreadCrumbProps {
|
|
12
|
+
onPathClick: Function;
|
|
13
|
+
onHomeClick: Function;
|
|
14
|
+
items: Item[];
|
|
9
15
|
}
|
|
@@ -4,30 +4,29 @@ export const Container = styled.div`
|
|
|
4
4
|
margin: 0 0 16px 0;
|
|
5
5
|
`
|
|
6
6
|
|
|
7
|
-
export const
|
|
7
|
+
export const ListItems = styled.div`
|
|
8
8
|
display: flex;
|
|
9
9
|
gap: 8px;
|
|
10
10
|
.content {
|
|
11
11
|
display: flex;
|
|
12
12
|
gap: 8px;
|
|
13
|
+
align-items: center;
|
|
13
14
|
}
|
|
14
15
|
`
|
|
15
16
|
|
|
16
|
-
export const
|
|
17
|
+
export const Item = styled.p`
|
|
17
18
|
color: #666;
|
|
18
19
|
font-size: 14px;
|
|
19
20
|
cursor: pointer;
|
|
21
|
+
&:hover {
|
|
22
|
+
text-decoration: underline;
|
|
23
|
+
}
|
|
20
24
|
`
|
|
21
25
|
|
|
22
|
-
export const
|
|
26
|
+
export const Divisor = styled.div`
|
|
23
27
|
display: flex;
|
|
24
28
|
align-items: center;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
display: inline-block;
|
|
29
|
-
padding: 2px;
|
|
30
|
-
transform: rotate(-45deg);
|
|
31
|
-
-webkit-transform: rotate(-45deg);
|
|
32
|
-
}
|
|
29
|
+
justify-content: center;
|
|
30
|
+
color: #666;
|
|
31
|
+
content: '/';
|
|
33
32
|
`
|
package/src/components/Icons.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import { SvgIconComponent } from '@mui/icons-material';
|
|
2
3
|
import { iconsSVG } from './Svgs';
|
|
3
4
|
import { IconColors, IconScale } from '../types';
|
|
4
5
|
import { IconsProps, SvgProps } from '../interfaces/Icons';
|
|
@@ -13,7 +14,7 @@ export const Svg = styled.svg<SvgProps>(
|
|
|
13
14
|
({ inline }) => (inline ? { display: 'inline-block' } : { display: 'block' }),
|
|
14
15
|
);
|
|
15
16
|
|
|
16
|
-
const scaleSize: Record<IconScale, number
|
|
17
|
+
const scaleSize: Partial<Record<IconScale, number>> = {
|
|
17
18
|
xsmall: 14,
|
|
18
19
|
small: 20,
|
|
19
20
|
medium: 24,
|
|
@@ -23,7 +24,6 @@ const scaleSize: Record<IconScale, number> = {
|
|
|
23
24
|
'3xlarge': 40,
|
|
24
25
|
};
|
|
25
26
|
|
|
26
|
-
// Definindo um objeto com as cores de preenchimento e traço com base no MUI
|
|
27
27
|
const colors: Record<IconColors, string> = {
|
|
28
28
|
inherit: palette.inherit,
|
|
29
29
|
primary: palette.primary,
|
|
@@ -36,6 +36,7 @@ const colors: Record<IconColors, string> = {
|
|
|
36
36
|
black: palette.black,
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
+
|
|
39
40
|
export const Icons: FunctionComponent<IconsProps> = ({
|
|
40
41
|
icon,
|
|
41
42
|
scale,
|
|
@@ -46,13 +47,12 @@ export const Icons: FunctionComponent<IconsProps> = ({
|
|
|
46
47
|
let width = 24;
|
|
47
48
|
let height = 24;
|
|
48
49
|
if (scale) {
|
|
49
|
-
width = scaleSize[scale];
|
|
50
|
-
height = scaleSize[scale];
|
|
50
|
+
width = scaleSize[scale] || 24;
|
|
51
|
+
height = scaleSize[scale] || 24;
|
|
51
52
|
}
|
|
52
53
|
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
const stroke = colors[color];
|
|
54
|
+
const fill = colors[color] || color;
|
|
55
|
+
const stroke = colors[color] || color;
|
|
56
56
|
|
|
57
57
|
const Svg = styled.svg`
|
|
58
58
|
display: inline-block;
|
|
@@ -70,13 +70,17 @@ export const Icons: FunctionComponent<IconsProps> = ({
|
|
|
70
70
|
}
|
|
71
71
|
`;
|
|
72
72
|
|
|
73
|
+
const isMuiIcon = typeof icon !== 'string';
|
|
74
|
+
|
|
73
75
|
return (
|
|
74
76
|
<Svg viewBox="0 0 56 56" width={`${width}px`} height={`${height}px`} {...props}>
|
|
75
77
|
{useSymbol ? (
|
|
76
78
|
<use xlinkHref={`#icon--${icon}`} fill={fill} stroke={stroke} />
|
|
79
|
+
) : isMuiIcon ? (
|
|
80
|
+
React.createElement(icon as SvgIconComponent, { style: { fill, stroke } })
|
|
77
81
|
) : (
|
|
78
82
|
React.cloneElement(iconsSVG[icon], { fill, stroke })
|
|
79
83
|
)}
|
|
80
84
|
</Svg>
|
|
81
85
|
);
|
|
82
|
-
};
|
|
86
|
+
};
|
|
@@ -9,6 +9,9 @@ export const ProductCardStyle = styled.div<{ disabled?: boolean, $bColor?: strin
|
|
|
9
9
|
border-left: 7px solid ${(props) => props.hasBorder ? props.$bColor : 'transparent'} !important;
|
|
10
10
|
border-radius: 5px;
|
|
11
11
|
|
|
12
|
+
p.title {
|
|
13
|
+
font-weight: 600;
|
|
14
|
+
}
|
|
12
15
|
|
|
13
16
|
p.description {
|
|
14
17
|
margin-bottom: ${pxToRem(17)};
|
|
@@ -37,8 +40,8 @@ export const IconCardStyle = styled.div<{ $bColor?: string; $iColor: string }>`
|
|
|
37
40
|
box-sizing: border-box;
|
|
38
41
|
|
|
39
42
|
svg {
|
|
40
|
-
|
|
41
|
-
|
|
43
|
+
max-height: 100%;
|
|
44
|
+
max-width: 100%;
|
|
42
45
|
path {
|
|
43
46
|
fill: ${(props) => props.$iColor};
|
|
44
47
|
}
|
|
@@ -5,22 +5,20 @@ import { IconCardStyle, ProductCardStyle, TitleContainer } from "./ProductCard.s
|
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { IconButton } from "../IconButton";
|
|
7
7
|
import GradeIcon from '@mui/icons-material/Grade'
|
|
8
|
-
import {
|
|
8
|
+
import { Icons } from '../Icons'
|
|
9
|
+
import { IconScale, IconType } from "../../types";
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
export const ProductCard: React.FC<ProductCardProps> = ({
|
|
12
13
|
// product = 'analytics'
|
|
13
14
|
color,
|
|
14
|
-
|
|
15
|
-
iconSize,
|
|
15
|
+
icon,
|
|
16
16
|
onClick,
|
|
17
17
|
hasBorder = true,
|
|
18
18
|
disabled = false,
|
|
19
19
|
title,
|
|
20
20
|
description,
|
|
21
|
-
|
|
22
|
-
flaggable = false,
|
|
23
|
-
flagged = false
|
|
21
|
+
favorite,
|
|
24
22
|
}) => {
|
|
25
23
|
|
|
26
24
|
/* const colors: { [key: string]: string } = {
|
|
@@ -31,38 +29,40 @@ export const ProductCard: React.FC<ProductCardProps> = ({
|
|
|
31
29
|
}
|
|
32
30
|
*/
|
|
33
31
|
return (
|
|
34
|
-
<ProductCardStyle disabled={disabled} $bColor={iconColor} hasBorder={hasBorder}>
|
|
32
|
+
<ProductCardStyle disabled={disabled} $bColor={icon?.iconColor} hasBorder={hasBorder}>
|
|
35
33
|
<Card
|
|
36
34
|
variant="outlined"
|
|
37
35
|
onClick={() => onClick && onClick()}
|
|
38
36
|
>
|
|
39
|
-
{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
37
|
+
{favorite?.flagged && (
|
|
38
|
+
<Grid container justifyContent={'flex-end'} alignItems={'flex-start'} position={'relative'}>
|
|
39
|
+
<Grid item>
|
|
40
|
+
<IconButton
|
|
41
|
+
sx={{
|
|
42
|
+
padding: 0,
|
|
43
|
+
position: 'absolute',
|
|
44
|
+
top: '10px',
|
|
45
|
+
right: '5px',
|
|
46
|
+
}}
|
|
47
|
+
aria-label="favorite"
|
|
48
|
+
onClick={favorite.onFlag}
|
|
49
|
+
color={favorite.flagged ? 'primary' : 'inherit'}
|
|
50
|
+
cursor="pointer"
|
|
51
|
+
>
|
|
52
|
+
<GradeIcon />
|
|
53
|
+
</IconButton>
|
|
54
|
+
</Grid>
|
|
55
|
+
</Grid>
|
|
56
56
|
)}
|
|
57
57
|
|
|
58
58
|
<TitleContainer>
|
|
59
59
|
<IconCardStyle
|
|
60
|
-
$iColor={iconColor}
|
|
60
|
+
$iColor={icon?.iconColor || ""}
|
|
61
61
|
$bColor={color}
|
|
62
62
|
>
|
|
63
|
-
<
|
|
63
|
+
<Icons icon={icon?.iconName as IconType} color={icon?.iconColor} scale={icon?.scale as IconScale} width={icon?.iconWidth} height={icon?.iconHeight} />
|
|
64
64
|
</IconCardStyle>
|
|
65
|
-
<p>{title}</p>
|
|
65
|
+
<p className="title">{title}</p>
|
|
66
66
|
</TitleContainer>
|
|
67
67
|
|
|
68
68
|
<p className="description">
|
|
@@ -2,13 +2,13 @@ import React from "react";
|
|
|
2
2
|
import { ServiceCardProps } from "../../interfaces/ServiceCard";
|
|
3
3
|
import { IconCardStyle, ServiceCardStyle, TitleContainer } from "./ServiceCard.style";
|
|
4
4
|
import { Card } from "../Card";
|
|
5
|
-
import {
|
|
5
|
+
import { Icons } from "../Icons";
|
|
6
|
+
import { IconType, IconScale } from "../../types";
|
|
6
7
|
|
|
7
|
-
export const ServiceCard: React.FC<ServiceCardProps> = ({
|
|
8
|
+
export const ServiceCard: React.FC<ServiceCardProps> = ({ icon, onClick, disabled = false, description, title}) => {
|
|
8
9
|
return (
|
|
9
|
-
<ServiceCardStyle disabled={disabled} $bColor={iconColor}>
|
|
10
|
+
<ServiceCardStyle disabled={disabled} $bColor={icon?.iconColor || ""}>
|
|
10
11
|
<Card
|
|
11
|
-
border={true}
|
|
12
12
|
variant="outlined"
|
|
13
13
|
onClick={() => {
|
|
14
14
|
if (disabled) return;
|
|
@@ -16,8 +16,8 @@ export const ServiceCard: React.FC<ServiceCardProps> = ({iconName, onClick, disa
|
|
|
16
16
|
}}
|
|
17
17
|
>
|
|
18
18
|
<TitleContainer>
|
|
19
|
-
<IconCardStyle $iColor={iconColor || ""} $bColor={
|
|
20
|
-
<
|
|
19
|
+
<IconCardStyle $iColor={icon?.iconColor || ""} $bColor={icon?.bgColor || ""}>
|
|
20
|
+
<Icons icon={icon?.iconName as IconType} color={icon?.iconColor} scale={icon?.scale as IconScale} width={icon?.iconWidth} height={icon?.iconHeight} />
|
|
21
21
|
</IconCardStyle>
|
|
22
22
|
<div className="text">
|
|
23
23
|
<p className="title">{title}</p>
|