@prosistemas/sca-web-kit 3.0.0 → 3.1.0
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/components/shared/newsletter-modal/newsletter-modal.d.ts +2 -1
- package/dist/components/shared/newsletter-modal/newsletter-modal.js +2 -4
- package/dist/components/shared/newsletter-modal-dialog/newsletter-modal-dialog.d.ts +2 -1
- package/dist/components/shared/newsletter-modal-dialog/newsletter-modal-dialog.js +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export default function NewsletterModal({ onCloseButtonClick, type, }: {
|
|
1
|
+
export default function NewsletterModal({ onCloseButtonClick, type, iconSrc, }: {
|
|
2
2
|
onCloseButtonClick?: () => void;
|
|
3
3
|
type: 'success' | 'already-registered' | 'error';
|
|
4
|
+
iconSrc: string;
|
|
4
5
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import styles from './newsletter-modal.module.scss';
|
|
3
3
|
import { montserrat } from '../../../fonts';
|
|
4
|
-
import newsletterErrorIcon from '@prosistemas/sca-web-kit/assets/icons/not-found.svg';
|
|
5
|
-
import newsletterSuccessIcon from '@prosistemas/sca-web-kit/assets/icons/newsletter-success.svg';
|
|
6
4
|
import Button from '../../ui/button/button';
|
|
7
5
|
import { XIcon } from '@phosphor-icons/react/dist/ssr';
|
|
8
|
-
export default function NewsletterModal({ onCloseButtonClick, type, }) {
|
|
9
|
-
return (_jsxs("div", { className: styles['newsletter-modal'], children: [_jsx(Button, { className: styles['close-button'], icon: XIcon, iconWeight: "bold", round: true, onClick: onCloseButtonClick }), _jsx("img", { src:
|
|
6
|
+
export default function NewsletterModal({ onCloseButtonClick, type, iconSrc, }) {
|
|
7
|
+
return (_jsxs("div", { className: styles['newsletter-modal'], children: [_jsx(Button, { className: styles['close-button'], icon: XIcon, iconWeight: "bold", round: true, onClick: onCloseButtonClick }), _jsx("img", { src: iconSrc, alt: "", width: 150, height: 150, className: styles['icon'] }), type === 'success' ? (_jsxs(_Fragment, { children: [_jsx("p", { className: `${styles['title']} ${montserrat.className}`, children: "Cadastro realizado com sucesso!" }), _jsx("p", { className: styles['subtitle'], children: "Agora voc\u00EA receber\u00E1 em primeira m\u00E3o, os melhores conte\u00FAdos sobre gest\u00E3o de pessoas, despesas e benef\u00EDcios." })] })) : type === 'already-registered' ? (_jsxs(_Fragment, { children: [_jsx("p", { className: `${styles['title']} ${montserrat.className}`, children: "Seu e-mail j\u00E1 est\u00E1 cadastrado!" }), _jsx("p", { className: styles['subtitle'], children: "Esse endere\u00E7o de e-mail j\u00E1 consta no nosso banco de dados. " })] })) : (_jsxs(_Fragment, { children: [_jsx("p", { className: `${styles['title']} ${montserrat.className}`, children: "Um erro ocorreu ao registrar seu e-mail!" }), _jsx("p", { className: styles['subtitle'], children: "Verifique se o seu e-mail foi digitado corretamente e tente novamente por gentileza." })] }))] }));
|
|
10
8
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export default function NewsletterModalDialog({ modalType, open, setOpenAction, }: {
|
|
1
|
+
export default function NewsletterModalDialog({ modalType, iconSrc, open, setOpenAction, }: {
|
|
2
2
|
modalType: 'success' | 'already-registered' | 'error';
|
|
3
|
+
iconSrc: string;
|
|
3
4
|
open: boolean;
|
|
4
5
|
setOpenAction: React.Dispatch<React.SetStateAction<boolean>>;
|
|
5
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,8 +4,8 @@ import styles from './newsletter-modal-dialog.module.scss';
|
|
|
4
4
|
import NewsletterModal from '../newsletter-modal/newsletter-modal';
|
|
5
5
|
import * as Dialog from '@radix-ui/react-dialog';
|
|
6
6
|
import * as VisuallyHidden from '@radix-ui/react-visually-hidden';
|
|
7
|
-
export default function NewsletterModalDialog({ modalType, open, setOpenAction, }) {
|
|
8
|
-
return (_jsx(Dialog.Root, { open: open, children: _jsx(Dialog.Portal, { children: _jsx(Dialog.Overlay, { className: styles['overlay'], children: _jsxs(Dialog.Content, { children: [_jsx(VisuallyHidden.Root, { children: _jsx(Dialog.Title, { children: "Tela de confirma\u00E7\u00E3o de inscri\u00E7\u00E3o na Newsletter do SCA" }) }), _jsx(NewsletterModal, { type: modalType, onCloseButtonClick: () => {
|
|
7
|
+
export default function NewsletterModalDialog({ modalType, iconSrc, open, setOpenAction, }) {
|
|
8
|
+
return (_jsx(Dialog.Root, { open: open, children: _jsx(Dialog.Portal, { children: _jsx(Dialog.Overlay, { className: styles['overlay'], children: _jsxs(Dialog.Content, { children: [_jsx(VisuallyHidden.Root, { children: _jsx(Dialog.Title, { children: "Tela de confirma\u00E7\u00E3o de inscri\u00E7\u00E3o na Newsletter do SCA" }) }), _jsx(NewsletterModal, { iconSrc: iconSrc, type: modalType, onCloseButtonClick: () => {
|
|
9
9
|
setOpenAction(false);
|
|
10
10
|
} })] }) }) }) }));
|
|
11
11
|
}
|