Skip to content

Commit 55ffb86

Browse files
Merge branch 'main' into tshepo/f/readonly
2 parents 19fd3cf + 3d1d8ea commit 55ffb86

File tree

5 files changed

+168
-148
lines changed

5 files changed

+168
-148
lines changed

shesha-reactjs/src/designer-components/drawer/drawer.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ interface IShaDrawer {
2727
placement?: 'top' | 'right' | 'bottom' | 'left';
2828
width?: string | number;
2929
readOnly?: boolean;
30+
background?: CSSProperties;
3031
}
3132

3233
interface IShaDrawerState {
@@ -54,6 +55,7 @@ const ShaDrawer: FC<IShaDrawer> = (props) => {
5455
headerStyle,
5556
footerStyle,
5657
showFooter,
58+
background,
5759
} = props;
5860
const allData = useAvailableConstantsData();
5961
const [state, setState] = useState<IShaDrawerState>();
@@ -138,6 +140,7 @@ const ShaDrawer: FC<IShaDrawer> = (props) => {
138140
</Fragment>
139141
);
140142
}
143+
141144
return (
142145
<Drawer
143146
open={state?.open}
@@ -147,7 +150,8 @@ const ShaDrawer: FC<IShaDrawer> = (props) => {
147150
styles={{
148151
header: { display: showHeader ? 'block' : 'none', ...headerStyle },
149152
footer: { display: showFooter ? 'block' : 'none', ...footerStyle },
150-
body: style,
153+
body: background,
154+
content: style,
151155
}}
152156
title={label}
153157
size="large"

shesha-reactjs/src/designer-components/drawer/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ const DrawerComponent: IToolboxComponent<IDrawerProps> = {
114114
...shadowStyles,
115115
...stylingBoxAsCSS,
116116
...borderStyles,
117-
...backgroundStyles,
118117
...jsStyle,
119118
});
120119

@@ -132,6 +131,7 @@ const DrawerComponent: IToolboxComponent<IDrawerProps> = {
132131

133132
return (
134133
<ShaDrawer
134+
background={backgroundStyles}
135135
style={additionalStyles}
136136
headerStyle={additionalHeaderStyles}
137137
footerStyle={additionalFooterStyles}

0 commit comments

Comments
 (0)