Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOF-7411: Minor dialog changes #76

Merged
merged 18 commits into from
Jul 31, 2024
Merged
8 changes: 4 additions & 4 deletions dist/mui/components/custom/date-picker/DatePicker.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ export type DateRange = {
};
interface DatePickerProps {
onChange: (dateRange: DateRange | Record<string, never>, option?: DateRangeOption | null) => void;
startDate: Moment | null;
endDate: Moment | null;
defaultOption: DateRangeOption | null;
isMaxOption: boolean;
startDate?: Moment | null;
endDate?: Moment | null;
defaultOption?: DateRangeOption | null;
isMaxOption?: boolean;
}
declare function DatePicker({ onChange, startDate, endDate, defaultOption, isMaxOption, }: DatePickerProps): React.JSX.Element;
export default DatePicker;
6 changes: 5 additions & 1 deletion dist/mui/components/dialog/Dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ function DialogModal({ id = "modal-dialog", title, titleComponent, open, scroll
React.createElement(IconByName, { name: "actions.close", fontSize: "small" }))))));
}, [title, titleComponent]);
const renderBodyDefault = () => {
return React.createElement(DialogContent, { dividers: dividers }, children);
return (React.createElement(DialogContent, { sx: {
display: "flex",
flexDirection: "column",
overflow: "hidden",
}, dividers: dividers }, children));
};
const renderFooterDefault = () => {
return (React.createElement(DialogActions, null,
Expand Down
8 changes: 4 additions & 4 deletions src/mui/components/custom/date-picker/DatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ interface DatePickerProps {
dateRange: DateRange | Record<string, never>,
option?: DateRangeOption | null,
) => void;
startDate: Moment | null;
endDate: Moment | null;
defaultOption: DateRangeOption | null;
isMaxOption: boolean;
startDate?: Moment | null;
endDate?: Moment | null;
defaultOption?: DateRangeOption | null;
isMaxOption?: boolean;
}

function DatePicker({
Expand Down
12 changes: 11 additions & 1 deletion src/mui/components/dialog/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,17 @@ function DialogModal({
}, [title, titleComponent]);

const renderBodyDefault = () => {
return <DialogContent dividers={dividers}>{children}</DialogContent>;
return (
<DialogContent
sx={{
display: "flex",
flexDirection: "column",
overflow: "hidden",
}}
dividers={dividers}>
{children}
</DialogContent>
);
};

const renderFooterDefault = () => {
Expand Down
Loading