fix(modal and dialogues): fixes as per specifications (#3438)

Co-authored-by: Alireza <ar.sedghi@gmail.com>
This commit is contained in:
Joe BoccanfusoandAlireza authored and GitHub committed 2023-06-07 08:31:09 -04:00
1 parent ffaffbdfa3
commit da5c32bce3
27 files changed
+180 -170

No files matched your search

@@ -31,7 +31,6 @@ export default function getCommandsModule({
callInputDialog({
uiDialogService,
title: 'Enter your annotation',
defaultValue: '',
callback: (value: string, action: string) => {
switch (action) {
@@ -12,7 +12,7 @@ import { Input, Dialog } from '@ohif/ui';
*/
export default function callInputDialog({
uiDialogService,
title = 'Enter your annotation',
title = 'Annotation',
defaultValue = '',
callback = (value: string, action: string) => {}
}) {
@@ -49,27 +49,26 @@ export default function callInputDialog({
onSubmit: onSubmitHandler,
body: ({ value, setValue }) => {
return (
<div className="p-4 bg-primary-dark">
<Input
autoFocus
className="mt-2 bg-black border-primary-main"
type="text"
containerClassName="mr-2"
value={value.defaultValue}
onChange={event => {
event.persist();
setValue(value => ({ ...value, value: event.target.value }));
}}
onKeyPress={event => {
if (event.key === 'Enter') {
onSubmitHandler({ value, action: { id: 'save' } });
}
}}
/>
</div>
<Input
label="Enter your annotation"
labelClassName="text-white text-[14px] leading-[1.2]"
autoFocus
className="bg-black border-primary-main"
type="text"
value={value.defaultValue}
onChange={event => {
event.persist();
setValue(value => ({ ...value, value: event.target.value }));
}}
onKeyPress={event => {
if (event.key === 'Enter') {
onSubmitHandler({ value, action: { id: 'save' } });
}
}}
/>
);
},
},
});
}
}
}