Skip to content

Commit 55361cd

Browse files
committed
Sync on model changes
1 parent de7f575 commit 55361cd

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/components/projects/projectId/attributes/attributeId/LLM/LLMPlaygroundModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export default function LLMPlaygroundModal() {
122122
return attributes.filter(a => DISPLAY_STATES.includes(a.state)).map(a => ({ name: a.name, dataType: a.dataType }));
123123
}, [attributes])
124124

125-
return (<Modal modalName={ModalEnum.LLM_PLAYGROUND} acceptButton={acceptButton} modalWidth="ml-10 w-full max-w-[calc(100vw-15rem)]">
125+
return (<Modal modalName={ModalEnum.LLM_PLAYGROUND} acceptButton={acceptButton} className="ml-10 md:max-w-[calc(100vw-15rem)]">
126126
<div className="pl-2 pr-5 max-h-[calc(100vh-15rem)] overflow-y-auto">
127127
<div className="flex flex-row items-center justify-center">
128128
<span className="text-lg flex flex-row gap-x-2 text-gray-900 font-medium items-center">

src/components/shared/modal/Modal.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ export default function Modal(props: any) {
104104

105105
if (button.closeAfterClick) setOpen(false);
106106
}
107-
const modalWidth = props.modalWidth ? props.modalWidth : "sm:w-full sm:max-w-2xl";
108-
109107
return (
110108
<Transition.Root show={modal.open} as={Fragment}>
111109
<Dialog as="div" className="relative z-50" onClose={setOpen}>
@@ -132,7 +130,7 @@ export default function Modal(props: any) {
132130
leaveFrom="opacity-100 translate-y-0 sm:scale-100"
133131
leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
134132
>
135-
<Dialog.Panel className={"relative transform rounded-lg bg-white px-4 pt-5 pb-4 text-left shadow-xl transition-all sm:my-8 sm:p-6 modal-width " + modalWidth}>
133+
<Dialog.Panel className={`relative transform rounded-lg bg-white px-4 pt-5 pb-4 text-left shadow-xl transition-all sm:my-8 sm:p-6 modal-width sm:w-full sm:max-w-2xl ${props.className}`}>
136134
<div className="mt-3 text-center sm:mt-0">
137135
<div>{props.children}</div>
138136
</div>

0 commit comments

Comments
 (0)