@greghowe79/the-lib 0.4.3 → 0.4.4
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.
|
@@ -6,7 +6,7 @@ const styles = require("./styles.css.qwik.cjs");
|
|
|
6
6
|
const button = require("../button/button.qwik.cjs");
|
|
7
7
|
const closeIcon = require("../icons/closeIcon.qwik.cjs");
|
|
8
8
|
require("@fontsource/roboto-condensed");
|
|
9
|
-
const Modal = qwik.component$(({ title, open, primaryButtonLabel, secondaryButtonLabel, primaryAction, secondaryAction }) => {
|
|
9
|
+
const Modal = qwik.component$(({ title, open, primaryButtonLabel, secondaryButtonLabel, primaryAction, secondaryAction, closeButtonVisible = true }) => {
|
|
10
10
|
qwik.useStylesScoped$(styles);
|
|
11
11
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
12
12
|
id: "modal",
|
|
@@ -26,7 +26,7 @@ const Modal = qwik.component$(({ title, open, primaryButtonLabel, secondaryButto
|
|
|
26
26
|
id: "modal-title",
|
|
27
27
|
children: title
|
|
28
28
|
}),
|
|
29
|
-
/* @__PURE__ */ jsxRuntime.jsx(button.Button, {
|
|
29
|
+
closeButtonVisible && /* @__PURE__ */ jsxRuntime.jsx(button.Button, {
|
|
30
30
|
id: "close-button",
|
|
31
31
|
ariaLabel: "Chiudi modale",
|
|
32
32
|
onClick$: () => open.value = false,
|
|
@@ -4,7 +4,7 @@ import styles from "./styles.css.qwik.mjs";
|
|
|
4
4
|
import { Button } from "../button/button.qwik.mjs";
|
|
5
5
|
import { CloseIcon } from "../icons/closeIcon.qwik.mjs";
|
|
6
6
|
import "@fontsource/roboto-condensed";
|
|
7
|
-
const Modal = component$(({ title, open, primaryButtonLabel, secondaryButtonLabel, primaryAction, secondaryAction }) => {
|
|
7
|
+
const Modal = component$(({ title, open, primaryButtonLabel, secondaryButtonLabel, primaryAction, secondaryAction, closeButtonVisible = true }) => {
|
|
8
8
|
useStylesScoped$(styles);
|
|
9
9
|
return /* @__PURE__ */ jsx("div", {
|
|
10
10
|
id: "modal",
|
|
@@ -24,7 +24,7 @@ const Modal = component$(({ title, open, primaryButtonLabel, secondaryButtonLabe
|
|
|
24
24
|
id: "modal-title",
|
|
25
25
|
children: title
|
|
26
26
|
}),
|
|
27
|
-
/* @__PURE__ */ jsx(Button, {
|
|
27
|
+
closeButtonVisible && /* @__PURE__ */ jsx(Button, {
|
|
28
28
|
id: "close-button",
|
|
29
29
|
ariaLabel: "Chiudi modale",
|
|
30
30
|
onClick$: () => open.value = false,
|
|
@@ -3,6 +3,7 @@ import '@fontsource/roboto-condensed';
|
|
|
3
3
|
export interface ModalProps {
|
|
4
4
|
title?: string;
|
|
5
5
|
open: Signal<boolean>;
|
|
6
|
+
closeButtonVisible?: boolean;
|
|
6
7
|
primaryButtonLabel?: string;
|
|
7
8
|
secondaryButtonLabel?: string;
|
|
8
9
|
primaryAction?: QRL<() => void> | QRL<() => boolean> | QRL<() => Promise<void>>;
|