🔧 fix(genericModal/index.tsx): fix CSS class name in DialogContent to include gap-2 to add gap between elements
🔧 fix(genericModal/index.tsx): fix CSS class name in flex container to change height to h-[55vh] 🔧 fix(genericModal/index.tsx): fix CSS class name in div container to change height to h-[60px] and adjust width for different screen sizes 🔧 fix(genericModal/index.tsx): fix CSS class name in Badge component to add max-width and truncate long text 🔧 fix(genericModal/index.tsx): fix logic to handle long text in Tooltip component and truncate it if necessary 🔧 fix(genericModal/index.tsx): fix logic to handle button click in DialogFooter component and close modal if input value is empty
This commit is contained in:
parent
dcb8de5335
commit
1a83cce2f0
1 changed files with 36 additions and 34 deletions
|
|
@ -171,7 +171,7 @@ export default function GenericModal({
|
||||||
return (
|
return (
|
||||||
<Dialog open={true} onOpenChange={setModalOpen}>
|
<Dialog open={true} onOpenChange={setModalOpen}>
|
||||||
<DialogTrigger></DialogTrigger>
|
<DialogTrigger></DialogTrigger>
|
||||||
<DialogContent className="min-w-[80vw]">
|
<DialogContent className="min-w-[80vw] gap-2">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle className="flex items-center">
|
<DialogTitle className="flex items-center">
|
||||||
<span className="pr-2">{myModalTitle}</span>
|
<span className="pr-2">{myModalTitle}</span>
|
||||||
|
|
@ -200,7 +200,7 @@ export default function GenericModal({
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
!isEdit ? "rounded-lg border" : "",
|
!isEdit ? "rounded-lg border" : "",
|
||||||
"flex h-[60vh] w-full"
|
"flex h-[55vh] w-full"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{type == TypeModal.PROMPT && isEdit ? (
|
{type == TypeModal.PROMPT && isEdit ? (
|
||||||
|
|
@ -238,7 +238,7 @@ export default function GenericModal({
|
||||||
|
|
||||||
{type == TypeModal.PROMPT && (
|
{type == TypeModal.PROMPT && (
|
||||||
<>
|
<>
|
||||||
<div className="h-[6vh] overflow-y-auto custom-scroll">
|
<div className="h-[60px] overflow-y-auto custom-scroll md:w-5/6 sm:6/6 mt-3">
|
||||||
<div className="flex flex-wrap items-center">
|
<div className="flex flex-wrap items-center">
|
||||||
<Variable className=" -ml-px mr-1 flex h-4 w-4 text-primary"></Variable>
|
<Variable className=" -ml-px mr-1 flex h-4 w-4 text-primary"></Variable>
|
||||||
<span className="text-md font-semibold text-primary">
|
<span className="text-md font-semibold text-primary">
|
||||||
|
|
@ -284,7 +284,9 @@ export default function GenericModal({
|
||||||
setModalOpen(false);
|
setModalOpen(false);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
validatePrompt(false);
|
!inputValue || inputValue == ""
|
||||||
|
? setModalOpen(false)
|
||||||
|
: validatePrompt(false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue