Skip to content

Commit 3452ad7

Browse files
czwe-01claude
andcommitted
Update storedFilesRendererBase styles for text alignment and layout
- Add support for left and right text alignment via justify-content - Remove max-height constraint from container - Add downloadZip prop and adjust container height styles - Clean up unrelated styles - Restore text align functionality 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 1c0abf0 commit 3452ad7

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

shesha-reactjs/src/components/sidebarContainer/styles/styles.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ export const useStyles = createStyles(({ css, cx, prefixCls }) => {
5050
&.open {
5151
width: ${leftSidebarWidth};
5252
display: block;
53-
overflow: scroll;
5453
5554
.${sidebarHeader} {
5655
.sidebar-header-title {

shesha-reactjs/src/components/storedFilesRendererBase/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ export const StoredFilesRendererBase: FC<IStoredFilesRendererBaseProps> = ({
122122
hideFileName: rest.hideFileName && listType === 'thumbnail',
123123
isDragger,
124124
isStub,
125+
downloadZip
125126
},
126127
});
127128

shesha-reactjs/src/components/storedFilesRendererBase/styles/styles.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export const useStyles = createStyles(({ token, css, cx, prefixCls }, { style, m
7676
--font-size: ${fontSize ?? '14px'} !important;
7777
--ant-font-size: ${fontSize ?? '14px'} !important;
7878
display: flex;
79+
flex: 1;
7980
width: ${layout ? (width ?? '54px') + ' !important' : ''};
8081
height: ${layout ? (height ?? '54px') + ' !important' : ''};
8182
@@ -122,6 +123,7 @@ export const useStyles = createStyles(({ token, css, cx, prefixCls }, { style, m
122123
font-family: ${fontFamily ?? 'Segoe UI'};
123124
font-size: ${fontSize ?? '14px'};
124125
font-weight: ${fontWeight ?? '400'};
126+
text-align: ${textAlign ?? 'center'} !important;
125127
padding: 0 8px !important;
126128
width: ${(layout && width) ?? '54px'} !important;
127129
font-size: var(--font-size, 14px) !important;
@@ -186,7 +188,6 @@ export const useStyles = createStyles(({ token, css, cx, prefixCls }, { style, m
186188
padding: 2px;
187189
overflow-y: auto;
188190
display: flex;
189-
max-height: var(--container-max-height) !important;
190191
flex-direction: column;
191192
scrollbar-width: thin;
192193
&::-webkit-scrollbar {
@@ -202,6 +203,7 @@ export const useStyles = createStyles(({ token, css, cx, prefixCls }, { style, m
202203
.ant-upload-list-item-container {
203204
display: flex !important;
204205
flex-direction: row;
206+
width: 100%;
205207
&.ant-upload-animate-inline-appear,
206208
&.ant-upload-animate-inline-appear-active,
207209
&.ant-upload-animate-inline {
@@ -211,7 +213,7 @@ export const useStyles = createStyles(({ token, css, cx, prefixCls }, { style, m
211213
}
212214
width: ${layout ? (width ?? '54px') + ' !important' : ''};
213215
height: ${layout ? (height ?? '54px') + ' !important' : ''};
214-
justify-content: ${textAlign ?? 'center'};
216+
justify-content: ${textAlign === 'left' ? 'flex-start' : textAlign === 'right' ? 'flex-end' : (textAlign ?? 'center')};
215217
}
216218
217219
.ant-upload-list-item-action {
@@ -298,7 +300,7 @@ export const useStyles = createStyles(({ token, css, cx, prefixCls }, { style, m
298300
padding: 2px ${borderWidth ?? '2px'} !important;
299301
height: var(--container-height) !important;
300302
width: 100% !important;
301-
max-height: calc(var(--container-max-height) - 32px) !important;
303+
max-height: calc(var(--container-max-height) - ${model.downloadZip ? "32px" : "0px"}) !important;
302304
min-height: calc(var(--container-min-height) - 32px) !important;
303305
}
304306

0 commit comments

Comments
 (0)