`${theme.borderRadius} ${theme.borderRadius} 0 0`};
width: 100%;
height: 100%;
- flex-direction: column;
svg {
path {
@@ -23,16 +23,21 @@ const BoxWrapper = styled(Flex)`
const CancelButton = styled.button`
border: none;
background: none;
- display: flex;
- align-items: center;
+ width: min-content;
+ color: ${({ theme }) => theme.colors.neutral600};
- svg {
- path {
- fill: ${({ theme }) => theme.colors.neutral200};
- }
+ &:hover,
+ &:focus {
+ color: ${({ theme }) => theme.colors.neutral700};
+ }
+ svg {
height: 10px;
width: 10px;
+
+ path {
+ fill: currentColor;
+ }
}
`;
@@ -40,34 +45,26 @@ export const UploadProgress = ({ onCancel, progress, error }) => {
const { formatMessage } = useIntl();
return (
-
+
{error ? (
) : (
- <>
-
-
- {`${progress}/100%`}
-
-
+
+ {`${progress}/100%`}
-
- {formatMessage({
- id: 'app.components.Button.cancel',
- defaultMessage: 'Cancel',
- })}
-
-
-
-
+
+
+ {formatMessage({
+ id: 'app.components.Button.cancel',
+ defaultMessage: 'Cancel',
+ })}
+
+
+
+
- >
+
)}
);
diff --git a/packages/core/upload/admin/src/components/UploadProgress/tests/index.test.js b/packages/core/upload/admin/src/components/UploadProgress/tests/index.test.js
index e974cf0b65c..c2ee5296c41 100644
--- a/packages/core/upload/admin/src/components/UploadProgress/tests/index.test.js
+++ b/packages/core/upload/admin/src/components/UploadProgress/tests/index.test.js
@@ -49,31 +49,25 @@ describe('', () => {
} = renderCompo();
expect(firstChild).toMatchInlineSnapshot(`
- .c7 {
+ .c10 {
font-size: 0.75rem;
line-height: 1.33;
- color: #dcdce4;
}
.c0 {
- background: #4a4a6a;
- border-radius: 4px;
+ background: #eaeaef;
}
.c3 {
- padding-bottom: 8px;
+ width: 100%;
}
- .c4 {
+ .c6 {
background: #666687;
border-radius: 4px;
position: relative;
- width: 78px;
- height: 4px;
- }
-
- .c8 {
- padding-left: 8px;
+ width: 102px;
+ height: 8px;
}
.c1 {
@@ -88,13 +82,41 @@ describe('', () => {
-webkit-flex-direction: row;
-ms-flex-direction: row;
flex-direction: row;
- -webkit-box-pack: center;
- -webkit-justify-content: center;
- -ms-flex-pack: center;
- justify-content: center;
}
- .c5:before {
+ .c4 {
+ -webkit-align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-flex-direction: column;
+ -ms-flex-direction: column;
+ flex-direction: column;
+ }
+
+ .c5 > * {
+ margin-top: 0;
+ margin-bottom: 0;
+ }
+
+ .c5 > * + * {
+ margin-top: 8px;
+ }
+
+ .c9 > * {
+ margin-left: 0;
+ margin-right: 0;
+ }
+
+ .c9 > * + * {
+ margin-left: 8px;
+ }
+
+ .c7:before {
background-color: #ffffff;
border-radius: 4px;
bottom: 0;
@@ -105,80 +127,82 @@ describe('', () => {
}
.c2 {
+ border-radius: 4px 4px 0 0;
width: 100%;
height: 100%;
- -webkit-flex-direction: column;
- -ms-flex-direction: column;
- flex-direction: column;
}
- .c6 {
+ .c8 {
border: none;
background: none;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
+ width: -webkit-min-content;
+ width: -moz-min-content;
+ width: min-content;
+ color: #666687;
}
- .c6 svg {
+ .c8:hover,
+ .c8:focus {
+ color: #4a4a6a;
+ }
+
+ .c8 svg {
height: 10px;
width: 10px;
}
- .c6 svg path {
- fill: #dcdce4;
+ .c8 svg path {
+ fill: currentColor;
}
-
+
+ Cancel
+
+
+
+
+