Skip to content

Commit 0784e55

Browse files
authored
Merge pull request #3882 from czwe-01/thulasizwe/f/3711
Thulasizwe/f/3711
2 parents 391320a + aa54866 commit 0784e55

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ export const FileUpload: FC<IFileUploadProps> = ({
198198
return (
199199
<div>
200200
{showThumbnailControls && styledfileControls()}
201-
<span title={file.name}>
201+
<a title={file.name}>
202202
<Space>
203203
<div className="thumbnail-item-name">
204204
{(listType === 'text' || !hideFileName) && (
@@ -214,7 +214,7 @@ export const FileUpload: FC<IFileUploadProps> = ({
214214
{showTextControls && fileControls(theme.application.primaryColor)}
215215
</div>
216216
</Space>
217-
</span>
217+
</a>
218218
</div>
219219
);
220220
};

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const useStyles = createStyles(({ token, css, cx, prefixCls }, { style, m
3838
height,
3939
maxHeight,
4040
minHeight,
41-
textAlign = 'center',
41+
textAlign = 'left',
4242
} = style || {};
4343

4444
const { layout, isDragger, hideFileName, listType } = model;
@@ -183,7 +183,8 @@ export const useStyles = createStyles(({ token, css, cx, prefixCls }, { style, m
183183
}
184184
185185
.${prefixCls}-upload {
186-
${layout && !isDragger && 'width: var(--thumbnail-width) !important;'};
186+
187+
width: ${layout && !isDragger ? 'var(--thumbnail-width)' : '100%'} !important;
187188
${layout && !isDragger && 'height: var(--thumbnail-height) !important'};
188189
border-radius: ${borderRadius} !important;
189190
align-items: center;
@@ -201,11 +202,10 @@ export const useStyles = createStyles(({ token, css, cx, prefixCls }, { style, m
201202
202203
.ant-btn {
203204
color: ${primaryColor || token.colorPrimary} !important;
205+
${commonTextStyles}
204206
padding: 0;
205207
* {
206-
font-size: ${fontSize} !important;
207-
font-weight: ${fontWeight} !important;
208-
font-family: ${fontFamily} !important;
208+
${commonTextStyles}
209209
}
210210
${listType === 'thumbnail' && style}
211211
width: 100%;

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ export const useStyles = createStyles(({ css, cx, token, prefixCls }, {
5858
const {
5959
backgroundImage: headerBgImage,
6060
backgroundColor: headerBgColor,
61+
backgroundSize: headerBackgroundSize,
62+
backgroundPosition: headerBackgroundPosition,
63+
backgroundRepeat: headerBackgroundRepeat,
6164
height: headerHeight,
6265
minHeight: headerMinHeight,
6366
maxHeight: headerMaxHeight,
@@ -158,6 +161,9 @@ export const useStyles = createStyles(({ css, cx, token, prefixCls }, {
158161
visibility: ${hideCollapseContent ? 'hidden' : 'visible'};
159162
background: ${headerBgImage || headerBgColor};
160163
width: ${width};
164+
background-size: ${headerBackgroundSize};
165+
background-repeat: ${headerBackgroundRepeat};
166+
background-position: ${headerBackgroundPosition};
161167
min-width: ${minWidth};
162168
max-width: ${maxWidth};
163169
height: ${headerHeight};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const FileUploadComponent: IToolboxComponent<IFileUploadProps> = {
4747
Factory: ({ model }) => {
4848
const { backendUrl } = useSheshaApplication();
4949

50-
const finalStyle = !model.enableStyleOnReadonly && model.readOnly ? {
50+
const finalStyle = (!model.enableStyleOnReadonly && model.readOnly) || model.listType === 'text' ? {
5151
...model.allStyles.fontStyles,
5252
...model.allStyles.dimensionsStyles,
5353
} : model.allStyles.fullStyle;

0 commit comments

Comments
 (0)