code7-leia 1.0.11 → 1.0.13

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.
Files changed (62) hide show
  1. package/dist/index.es.js +3356 -2922
  2. package/package.json +6 -6
  3. package/src/components/CustomToast/index.tsx +62 -0
  4. package/src/components/CustomToast/styles.tsx +74 -0
  5. package/src/components/EmptyState/index.tsx +88 -0
  6. package/src/components/EmptyState/styles.tsx +81 -0
  7. package/src/components/FileArea/components/AreaUpload/index.tsx +137 -0
  8. package/src/components/FileArea/components/AreaUpload/styles.tsx +86 -0
  9. package/src/components/FileArea/components/Modal/ModalButtonClose.tsx +23 -0
  10. package/src/components/FileArea/components/Modal/ModalContent.tsx +26 -0
  11. package/src/components/FileArea/components/Modal/ModalFooter.tsx +18 -0
  12. package/src/components/FileArea/components/Modal/ModalHeader.tsx +18 -0
  13. package/src/components/FileArea/components/Modal/ModalTitle.tsx +18 -0
  14. package/src/components/FileArea/components/Modal/index.tsx +131 -0
  15. package/src/components/FileArea/components/Modal/styles.tsx +121 -0
  16. package/src/components/FileArea/components/Search/index.tsx +45 -0
  17. package/src/components/FileArea/components/Search/styles.tsx +26 -0
  18. package/src/components/FileArea/components/Spinner/index.tsx +22 -0
  19. package/src/components/FileArea/components/Spinner/styles.tsx +59 -0
  20. package/src/components/FileArea/components/Table/index.tsx +34 -0
  21. package/src/components/FileArea/components/Table/styles.tsx +60 -0
  22. package/src/components/FileArea/index.tsx +279 -0
  23. package/src/components/FileArea/styles.tsx +183 -0
  24. package/src/components/LengthCounter/index.tsx +29 -0
  25. package/src/components/LengthCounter/styles.ts +11 -0
  26. package/src/components/Modal/index.tsx +30 -0
  27. package/src/components/Modal/styles.ts +52 -0
  28. package/src/components/MultiSelect/index.tsx +102 -0
  29. package/src/components/MultiSelect/styles.tsx +85 -0
  30. package/src/components/PersonasArea/index.tsx +196 -0
  31. package/src/components/PersonasArea/styles.ts +137 -0
  32. package/src/components/Select/index.tsx +60 -0
  33. package/src/components/Select/styles.tsx +49 -0
  34. package/src/components/TestArea/components/InputTest/index.tsx +23 -0
  35. package/src/components/TestArea/components/InputTest/styles.tsx +28 -0
  36. package/src/components/TestArea/components/TextArea/index.tsx +97 -0
  37. package/src/components/TestArea/components/TextArea/styles.tsx +173 -0
  38. package/src/components/TestArea/index.tsx +99 -0
  39. package/src/components/TestArea/styles.tsx +112 -0
  40. package/src/contexts/LeiaProvider.tsx +133 -0
  41. package/src/index.tsx +6 -0
  42. package/src/interface/FileData.ts +11 -0
  43. package/src/interface/Language.ts +95 -0
  44. package/src/interface/Table.ts +12 -0
  45. package/src/service/Api.ts +9 -0
  46. package/src/service/ApiDev.ts +9 -0
  47. package/src/service/ApiHml.ts +9 -0
  48. package/src/store/index.ts +13 -0
  49. package/src/store/modules/actions.ts +88 -0
  50. package/src/store/modules/reducer.ts +46 -0
  51. package/src/store/modules/sagas.ts +127 -0
  52. package/src/store/modules/types.ts +19 -0
  53. package/src/types/image.d.ts +4 -0
  54. package/src/utils/formatAxios.tsx +15 -0
  55. package/src/utils/getApi.tsx +16 -0
  56. package/src/utils/getLanguage.tsx +17 -0
  57. package/src/utils/languages/en.ts +107 -0
  58. package/src/utils/languages/es.ts +107 -0
  59. package/src/utils/languages/pt-br.ts +111 -0
  60. package/src/utils/stringNormalize.ts +9 -0
  61. package/dist/code7-leia.css +0 -1
  62. package/dist/index.cjs.js +0 -1073
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "code7-leia",
3
- "version": "1.0.11",
4
- "author": "Yan Guilherme",
3
+ "version": "1.0.13",
4
+ "author": "code7-xlab",
5
5
  "license": "MIT",
6
- "main": "dist/index.cjs.js",
7
- "module": "dist/index.es.js",
8
- "types": "dist/index.d.ts",
6
+ "main": "dist/index.es.js",
7
+ "module": "dist/index.cjs.js",
8
+ "types": "src/types/image.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
11
  "import": "./dist/index.es.js",
@@ -13,7 +13,7 @@
13
13
  }
14
14
  },
15
15
  "files": [
16
- "dist"
16
+ "src"
17
17
  ],
18
18
  "scripts": {
19
19
  "dev": "vite",
@@ -0,0 +1,62 @@
1
+ import React from 'react';
2
+ import { toast as reactToast } from 'react-toastify';
3
+
4
+ import { CustomContainerToast } from './styles';
5
+
6
+ interface CustomToastContentProps {
7
+ title: String;
8
+ description?: String;
9
+ }
10
+
11
+ const CustomToastContent: React.FC<CustomToastContentProps> = ({
12
+ title,
13
+ description
14
+ }) => {
15
+ return (
16
+ <>
17
+ <div className="custom-toastify-content">
18
+ <strong className="custom-toastify-title">{title}</strong>
19
+ {description && (
20
+ <p className="custom-toastify-description">{description}</p>
21
+ )}
22
+ </div>
23
+ </>
24
+ );
25
+ };
26
+
27
+ const toast = {
28
+ default: ({ title, description }: CustomToastContentProps) =>
29
+ reactToast(
30
+ <CustomToastContent
31
+ title={title}
32
+ description={description}
33
+ />
34
+ ),
35
+ success: ({ title, description }: CustomToastContentProps) =>
36
+ reactToast.success(
37
+ <CustomToastContent
38
+ title={title}
39
+ description={description}
40
+ />
41
+ ),
42
+ error: ({ title, description }: CustomToastContentProps) =>
43
+ reactToast.error(
44
+ <CustomToastContent
45
+ title={title}
46
+ description={description}
47
+ />
48
+ ),
49
+ warn: ({ title, description }: CustomToastContentProps) =>
50
+ reactToast.warn(
51
+ <CustomToastContent
52
+ title={title}
53
+ description={description}
54
+ />
55
+ ),
56
+ };
57
+
58
+ const ContainerToast: React.FC = () => {
59
+ return <CustomContainerToast autoClose={4000} />;
60
+ };
61
+
62
+ export { ContainerToast, toast };
@@ -0,0 +1,74 @@
1
+ import styled from 'styled-components';
2
+ import { ToastContainer } from 'react-toastify';
3
+ import 'react-toastify/dist/ReactToastify.css';
4
+
5
+ interface CustomContainerToastProps {
6
+ }
7
+
8
+ export const CustomContainerToast = styled(ToastContainer)<CustomContainerToastProps>`
9
+ .Toastify__toast {
10
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto',
11
+ 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans',
12
+ 'Helvetica Neue', sans-serif;
13
+ padding: 6px 12px;
14
+ border-radius: 5px;
15
+ top: 66px;
16
+
17
+ .custom-toastify-content {
18
+ display: flex;
19
+ flex-direction: column;
20
+ }
21
+ .custom-toastify-icon {
22
+ margin-right: 10px;
23
+ }
24
+ .custom-toastify-title {
25
+ color: #3d4859;
26
+ font-size: 0.875rem;
27
+ margin-bottom: 2px;
28
+ }
29
+ .custom-toastify-description {
30
+ color: #5a5d68;
31
+ font-size: 0.813rem;
32
+ margin-bottom: 2px;
33
+ }
34
+ .custom-toastify-action {
35
+ margin-top: 14px;
36
+ }
37
+ }
38
+
39
+ .Toastify__toast--default {
40
+ background: #fff;
41
+ border-left: 5px solid #3366FF;
42
+ }
43
+
44
+ .Toastify__toast--success {
45
+ background: #fff;
46
+ border-left: 5px solid #3366FF;
47
+ }
48
+
49
+ .Toastify__toast--error {
50
+ background: #fff;
51
+ border-left: 5px solid #f9675b;
52
+ }
53
+
54
+ .Toastify__toast--warning {
55
+ border-left: 5px solid #f9a75b;
56
+ background: #fff;
57
+ }
58
+
59
+ .Toastify__close-button {
60
+ color: #858f9e;
61
+ }
62
+
63
+ .Toastify__toast-body {
64
+ margin: auto 0px;
65
+ font-size: 1rem;
66
+ flex: 1 1 0%;
67
+ display: flex;
68
+ align-items: center;
69
+ }
70
+
71
+ .Toastify__progress-bar {
72
+ background: #3d48593d;
73
+ }
74
+ `;
@@ -0,0 +1,88 @@
1
+ import React, { FC, ReactElement } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import * as S from './styles';
4
+
5
+ interface EmptyStateProps {
6
+ icon?: string | ReactElement;
7
+ title?: string;
8
+ description?: string;
9
+ activeButton?: boolean;
10
+ iconButton?: ReactElement;
11
+ descriptionButton?: string;
12
+ widthButton?: string;
13
+ button?: ReactElement;
14
+ backgroundIcon?: string;
15
+ backgroundColor?: string;
16
+ hasborder?: boolean;
17
+ }
18
+
19
+ const EmptyState: FC<EmptyStateProps> = ({
20
+ icon,
21
+ title,
22
+ description,
23
+ activeButton,
24
+ iconButton,
25
+ descriptionButton,
26
+ widthButton,
27
+ button,
28
+ backgroundIcon,
29
+ backgroundColor,
30
+ hasborder,
31
+ ...rest
32
+ }) => {
33
+ return (
34
+ <S.Container
35
+ backgroundicon={backgroundIcon}
36
+ backgroundcolor={backgroundColor}
37
+ hasborder={hasborder}
38
+ {...rest}
39
+ >
40
+ <div className="content">
41
+ <div className="icon">
42
+ {icon}
43
+ </div>
44
+ <div className="description">
45
+ <h5> {title}</h5>
46
+
47
+ <p>{description}</p>
48
+
49
+ {activeButton ? (
50
+ <button>
51
+ {iconButton} {descriptionButton}
52
+ </button>
53
+ ) : null}
54
+
55
+ {button}
56
+ </div>
57
+ </div>
58
+ </S.Container>
59
+ );
60
+ };
61
+
62
+ EmptyState.propTypes = {
63
+ icon: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
64
+ title: PropTypes.string,
65
+ description: PropTypes.string,
66
+ activeButton: PropTypes.bool,
67
+ iconButton: PropTypes.element,
68
+ descriptionButton: PropTypes.string,
69
+ widthButton: PropTypes.string,
70
+ button: PropTypes.element,
71
+ backgroundIcon: PropTypes.string,
72
+ backgroundColor: PropTypes.string,
73
+ hasborder: PropTypes.bool,
74
+ };
75
+
76
+ EmptyState.defaultProps = {
77
+ icon: '',
78
+ title: '',
79
+ description: '',
80
+ activeButton: false,
81
+ descriptionButton: '',
82
+ widthButton: '140px',
83
+ backgroundIcon: 'var(--neutral-0)',
84
+ backgroundColor: 'var(--absolute-white)',
85
+ hasborder: true,
86
+ };
87
+
88
+ export default EmptyState;
@@ -0,0 +1,81 @@
1
+ import styled from 'styled-components';
2
+
3
+ interface ContainerProps {
4
+ hasborder?: boolean;
5
+ backgroundcolor?: string;
6
+ backgroundicon?: string;
7
+ }
8
+
9
+ export const Container = styled.div<ContainerProps>`
10
+ width: 100%;
11
+ display: flex;
12
+ justify-content: center;
13
+ padding: 24px 0;
14
+ height: 193px;
15
+
16
+ p {
17
+ margin: 10px 0;
18
+ }
19
+
20
+ background: ${({ hasborder }) =>
21
+ hasborder &&
22
+ `linear-gradient(
23
+ to right,
24
+ #dadce3 50%,
25
+ rgba(255, 255, 255, 0) 0%
26
+ ),
27
+ linear-gradient(#dadce3 50%, rgba(255, 255, 255, 0) 0%),
28
+ linear-gradient(to right, #dadce3 50%, rgba(255, 255, 255, 0) 0%),
29
+ linear-gradient(#dadce3 50%, rgba(255, 255, 255, 0) 0%)`};
30
+ background-position: top, right, bottom, left;
31
+ background-repeat: repeat-x, repeat-y;
32
+ background-size: 40px 1px, 1px 40px;
33
+ background-color: ${({ backgroundcolor }) => backgroundcolor};
34
+
35
+ button {
36
+ background: #102693;
37
+ color: white;
38
+ width: fit-content;
39
+ padding: 10px 20px;
40
+ border-radius: 4px;
41
+ }
42
+
43
+ & .content {
44
+ display: flex;
45
+ justify-content: space-between;
46
+ align-items: center;
47
+
48
+ & > .icon {
49
+ background-color: ${({ backgroundicon }) => backgroundicon};
50
+ border-radius: 16px;
51
+ width: 145px;
52
+ height: 145px;
53
+
54
+ display: flex;
55
+ justify-content: center;
56
+
57
+ & svg {
58
+ width: 100%;
59
+ height: 70%;
60
+ margin: 20px;
61
+ }
62
+ }
63
+
64
+ & .description {
65
+ max-width: 600px;
66
+ display: flex;
67
+ flex-direction: column;
68
+ justify-content: space-between;
69
+ padding: 8px 0 8px 24px;
70
+
71
+ .button-add {
72
+ cursor: pointer;
73
+ }
74
+
75
+ .start-icon {
76
+ display: flex;
77
+ align-items: center;
78
+ }
79
+ }
80
+ }
81
+ `;
@@ -0,0 +1,137 @@
1
+ import React, { useCallback, useEffect, useState } from 'react';
2
+ import { getLanguage } from '../../../../utils/getLanguage'
3
+ import { useDropzone, FileRejection } from 'react-dropzone';
4
+ import PropTypes from 'prop-types';
5
+
6
+ import { Container} from './styles';
7
+
8
+ interface FileProperties {
9
+ id: number;
10
+ lastModified: number;
11
+ lastModifiedDate: Date;
12
+ name: string;
13
+ size: number;
14
+ type: string;
15
+ }
16
+
17
+ interface AreaUploadProps {
18
+ formatFile?: string;
19
+ multipleFile?: boolean;
20
+ initialFiles?: File[];
21
+ removeItem?: (file: FileProperties) => void;
22
+ setFile?: (file: { content: ArrayBuffer | string; properties: File }) => void;
23
+ file: string | undefined;
24
+ onChange?: (files: File[]) => void;
25
+ hasListFiles?: boolean;
26
+ }
27
+
28
+ const AreaUpload: React.FC<AreaUploadProps> = ({
29
+ formatFile = 'application/pdf',
30
+ multipleFile = false,
31
+ initialFiles = [],
32
+ setFile = () => {},
33
+ file = '',
34
+ onChange = () => {},
35
+ }) => {
36
+ const [myFiles, setMyFiles] = useState<File[]>([]);
37
+ const t = getLanguage('pt-br')
38
+
39
+ useEffect(() => {
40
+ setMyFiles([...initialFiles, ...myFiles]);
41
+ }, []);
42
+
43
+ const onDrop = useCallback(
44
+ (acceptedFiles: File[], fileRejections: FileRejection[]) => {
45
+ if (fileRejections && fileRejections.length > 0) {
46
+ console.error('Arquivos rejeitados:', fileRejections);
47
+ }
48
+
49
+ onChange(acceptedFiles);
50
+
51
+ const files = [...myFiles, ...acceptedFiles];
52
+ const filesWithId = files.map((item, index) => ({
53
+ id: index + 1,
54
+ lastModified: item.lastModified,
55
+ name: item.name,
56
+ size: item.size,
57
+ type: item.type,
58
+ }));
59
+ setMyFiles(filesWithId as unknown as File[]);
60
+
61
+ acceptedFiles.forEach((file) => {
62
+ const reader = new FileReader();
63
+
64
+ reader.onload = () => {
65
+ const binaryStr = reader.result;
66
+ setFile({ content: binaryStr as ArrayBuffer, properties: file });
67
+ };
68
+ reader.readAsArrayBuffer(file);
69
+ });
70
+ },
71
+ [myFiles]
72
+ );
73
+
74
+ const {
75
+ getRootProps,
76
+ getInputProps,
77
+ open,
78
+ isDragActive,
79
+ isDragAccept,
80
+ isDragReject,
81
+ } = useDropzone({
82
+ accept: formatFile as any,
83
+ noClick: true,
84
+ noKeyboard: true,
85
+ multiple: multipleFile,
86
+ onDrop,
87
+ });
88
+
89
+ return (
90
+ <>
91
+ {(multipleFile || myFiles?.length === 0) || !file ? (
92
+ <Container
93
+ {...getRootProps({ isDragActive, isDragAccept, isDragReject })}
94
+ >
95
+ <input {...getInputProps()} />
96
+
97
+ <span>
98
+ <p>
99
+ {t.fileArea.modal.descriptionUpload}
100
+ </p>
101
+ </span>
102
+ <button type="button" onClick={open}>
103
+ {t.fileArea.modal.chooseFile}
104
+ </button>
105
+ </Container>
106
+ ) : (
107
+ <Container
108
+ {...getRootProps({ isDragActive, isDragAccept, isDragReject })}
109
+ >
110
+ <p>{file}</p>
111
+ </Container>
112
+ )}
113
+ </>
114
+ );
115
+ };
116
+
117
+ AreaUpload.propTypes = {
118
+ formatFile: PropTypes.string,
119
+ multipleFile: PropTypes.bool,
120
+ initialFiles: PropTypes.arrayOf(PropTypes.object as any),
121
+ removeItem: PropTypes.func,
122
+ setFile: PropTypes.func,
123
+ onChange: PropTypes.func,
124
+ hasListFiles: PropTypes.bool,
125
+ };
126
+
127
+ AreaUpload.defaultProps = {
128
+ formatFile: 'application/json',
129
+ multipleFile: false,
130
+ initialFiles: [],
131
+ removeItem: () => {},
132
+ setFile: () => {},
133
+ onChange: () => {},
134
+ hasListFiles: true,
135
+ };
136
+
137
+ export default AreaUpload;
@@ -0,0 +1,86 @@
1
+ import styled from 'styled-components';
2
+
3
+ interface ContainerProps {
4
+ isDragAccept?: boolean;
5
+ isDragReject?: boolean;
6
+ isDragActive?: boolean;
7
+ }
8
+
9
+ const getColor = (props: ContainerProps) => {
10
+ if (props.isDragAccept) {
11
+ return '#6690ff';
12
+ }
13
+ if (props.isDragReject) {
14
+ return '#e18976';
15
+ }
16
+ if (props.isDragActive) {
17
+ return '#6690ff';
18
+ }
19
+ return '#979aa5';
20
+ };
21
+
22
+ export const Container = styled.div<ContainerProps>`
23
+ background-color: #f3f5f9;
24
+ flex: 1;
25
+ display: flex;
26
+ align-items: center;
27
+ justify-content: center;
28
+ flex-direction: column;
29
+ padding: 20px;
30
+ border-width: 2px;
31
+ border-radius: 4px;
32
+ border-color: var(${(props) => getColor(props)});
33
+ border-style: dashed;
34
+ color: #5a5d68;
35
+ outline: none;
36
+ transition: border 0.24s ease-in-out;
37
+
38
+ & > span {
39
+ margin: 8px 10px 0 0;
40
+ display: flex;
41
+ }
42
+
43
+ button {
44
+ padding: 8px 16px 8px 16px;
45
+ border-radius: 4px;
46
+ border: 2px #102693 solid;
47
+ margin-top: 10px;
48
+ }
49
+
50
+ & > p {
51
+ flex-shrink: 1;
52
+ min-width: 0;
53
+ max-width: 90%;
54
+ overflow: hidden;
55
+ text-overflow: ellipsis;
56
+ white-space: nowrap;
57
+ display: block;
58
+ text-align: center;
59
+ }
60
+ `;
61
+
62
+ export const ListFiles = styled.div`
63
+ &.horizontal-itens {
64
+ display: flex;
65
+ flex-direction: row;
66
+ flex-wrap: wrap;
67
+
68
+ & button {
69
+ margin: 4px;
70
+ white-space: nowrap;
71
+ }
72
+
73
+ .tag-file {
74
+ display: flex;
75
+ gap: 8px;
76
+ padding: 10px 24px !important;
77
+ color: #102693 !important;
78
+ font-size: 14px;
79
+ letter-spacing: 0px;
80
+ }
81
+
82
+ .tag-icon {
83
+ cursor: pointer;
84
+ }
85
+ }
86
+ `;
@@ -0,0 +1,23 @@
1
+ import React, { ReactNode } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { MdClose } from 'react-icons/md';
4
+
5
+ import { ModalButtonClose } from './styles';
6
+
7
+ interface ModalButtonCloseComponentProps {
8
+ children?: ReactNode;
9
+ }
10
+
11
+ const ModalButtonCloseComponent: React.FC<ModalButtonCloseComponentProps> = ({ children, ...rest }) => {
12
+ return <ModalButtonClose {...rest}>{children}</ModalButtonClose>;
13
+ };
14
+
15
+ ModalButtonCloseComponent.propTypes = {
16
+ children: PropTypes.node,
17
+ };
18
+
19
+ ModalButtonCloseComponent.defaultProps = {
20
+ children: <MdClose color="#5A5D68" size={16} />,
21
+ };
22
+
23
+ export default ModalButtonCloseComponent;
@@ -0,0 +1,26 @@
1
+ import React, { ReactNode } from 'react';
2
+ import PropTypes from 'prop-types';
3
+
4
+ import { ModalContentWrapper } from './styles';
5
+
6
+ interface ModalContentProps {
7
+ children: ReactNode;
8
+ maxheight?: string;
9
+ overflowy?: string;
10
+ }
11
+
12
+ const ModalContent: React.FC<ModalContentProps> = ({ children, maxheight = 'max-content', overflowy = 'initial', ...rest }) => {
13
+ return (
14
+ <ModalContentWrapper maxheight={maxheight} overflowy={overflowy} {...rest}>
15
+ {children}
16
+ </ModalContentWrapper>
17
+ );
18
+ };
19
+
20
+ ModalContent.propTypes = {
21
+ children: PropTypes.node.isRequired,
22
+ maxheight: PropTypes.string,
23
+ overflowy: PropTypes.string,
24
+ };
25
+
26
+ export default ModalContent;
@@ -0,0 +1,18 @@
1
+ import React, { ReactNode } from 'react';
2
+ import PropTypes from 'prop-types';
3
+
4
+ import { ModalFooterWrapper } from './styles';
5
+
6
+ interface ModalFooterProps {
7
+ children: ReactNode;
8
+ }
9
+
10
+ const ModalFooter: React.FC<ModalFooterProps> = ({ children, ...rest }) => {
11
+ return <ModalFooterWrapper {...rest}>{children}</ModalFooterWrapper>;
12
+ };
13
+
14
+ ModalFooter.propTypes = {
15
+ children: PropTypes.node.isRequired,
16
+ };
17
+
18
+ export default ModalFooter;
@@ -0,0 +1,18 @@
1
+ import React, { ReactNode } from 'react';
2
+ import PropTypes from 'prop-types';
3
+
4
+ import { ModalHeader } from './styles';
5
+
6
+ interface ModalHeaderComponentProps {
7
+ children: ReactNode;
8
+ }
9
+
10
+ const ModalHeaderComponent: React.FC<ModalHeaderComponentProps> = ({ children, ...rest }) => {
11
+ return <ModalHeader {...rest}>{children}</ModalHeader>;
12
+ };
13
+
14
+ ModalHeaderComponent.propTypes = {
15
+ children: PropTypes.node.isRequired,
16
+ };
17
+
18
+ export default ModalHeaderComponent;
@@ -0,0 +1,18 @@
1
+ import React, { ReactNode } from 'react';
2
+ import PropTypes from 'prop-types';
3
+
4
+ import { ModalTitle } from './styles';
5
+
6
+ interface ModalTitleComponentProps {
7
+ children: ReactNode;
8
+ }
9
+
10
+ const ModalTitleComponent: React.FC<ModalTitleComponentProps> = ({ children, ...rest }) => {
11
+ return <ModalTitle {...rest}>{children}</ModalTitle>;
12
+ };
13
+
14
+ ModalTitleComponent.propTypes = {
15
+ children: PropTypes.node.isRequired,
16
+ };
17
+
18
+ export default ModalTitleComponent;