Fixed Bug 57880: Added theme support for download dialog.

This commit is contained in:
Tatiana Lopaeva 2022-06-30 13:14:31 +03:00
parent 5edde068f7
commit e891f8b6d6
4 changed files with 20 additions and 3 deletions

View File

@ -2571,6 +2571,10 @@ const Base = {
},
},
downloadDialog: {
background: "#f8f9f9",
},
studio: {
about: {
linkColor: blueMain,

View File

@ -2581,6 +2581,10 @@ const Dark = {
},
},
downloadDialog: {
background: "#282828",
},
studio: {
about: {
linkColor: "#E06A1B",

View File

@ -1,5 +1,6 @@
import React, { useState } from "react";
import Text from "@appserver/components/text";
import { inject, observer } from "mobx-react";
import LinkWithDropdown from "@appserver/components/link-with-dropdown";
import Checkbox from "@appserver/components/checkbox";
import ArrowIcon from "../../../../public/images/arrow.react.svg";
@ -18,6 +19,7 @@ const DownloadContent = (props) => {
title,
isChecked,
isIndeterminate,
theme,
} = props;
const getTitleExtensions = () => {
@ -102,7 +104,7 @@ const DownloadContent = (props) => {
const showHeader = items.length > 1;
return (
<StyledDownloadContent isOpen={showHeader ? isOpen : true}>
<StyledDownloadContent isOpen={showHeader ? isOpen : true} theme={theme}>
{showHeader && (
<div className="download-dialog_content-wrapper">
<Checkbox
@ -162,4 +164,11 @@ const DownloadContent = (props) => {
);
};
export default DownloadContent;
export default inject(({ auth }) => {
const { settingsStore } = auth;
const { theme } = settingsStore;
return {
theme,
};
})(observer(DownloadContent));

View File

@ -53,7 +53,7 @@ const StyledDownloadContent = styled.div`
${({ isOpen }) =>
isOpen &&
css`
background: #f8f9f9;
background: ${(props) => props.theme.downloadDialog.background};
margin: 0 -16px;
padding: 0 16px;
`}