Management: use colors from theme
This commit is contained in:
parent
c4dfeca90d
commit
a25d362723
@ -26,11 +26,15 @@
|
|||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { RowContent } from "@docspace/shared/components/row-content";
|
|
||||||
import { Text } from "@docspace/shared/components/text";
|
|
||||||
import styled, { css } from "styled-components";
|
import styled, { css } from "styled-components";
|
||||||
import { isMobileOnly } from "react-device-detect";
|
import { isMobileOnly } from "react-device-detect";
|
||||||
|
|
||||||
|
import { RowContent } from "@docspace/shared/components/row-content";
|
||||||
|
import { Text } from "@docspace/shared/components/text";
|
||||||
|
|
||||||
import { getConvertedSize } from "@docspace/shared/utils/common";
|
import { getConvertedSize } from "@docspace/shared/utils/common";
|
||||||
|
import { TTheme } from "@docspace/shared/themes";
|
||||||
|
|
||||||
import { TPortals } from "SRC_DIR/types/spaces";
|
import { TPortals } from "SRC_DIR/types/spaces";
|
||||||
|
|
||||||
const StyledRowContent = styled(RowContent)`
|
const StyledRowContent = styled(RowContent)`
|
||||||
@ -52,9 +56,10 @@ const StyledRowContent = styled(RowContent)`
|
|||||||
type TRoomContent = {
|
type TRoomContent = {
|
||||||
item: TPortals;
|
item: TPortals;
|
||||||
isCurrentPortal: boolean;
|
isCurrentPortal: boolean;
|
||||||
|
theme: TTheme;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const RoomContent = ({ item, isCurrentPortal }: TRoomContent) => {
|
export const RoomContent = ({ item, isCurrentPortal, theme }: TRoomContent) => {
|
||||||
const { t } = useTranslation(["Management", "Common", "Settings"]);
|
const { t } = useTranslation(["Management", "Common", "Settings"]);
|
||||||
|
|
||||||
const { roomAdminCount, usersCount, roomsCount, usedSize } =
|
const { roomAdminCount, usersCount, roomsCount, usedSize } =
|
||||||
@ -71,11 +76,14 @@ export const RoomContent = ({ item, isCurrentPortal }: TRoomContent) => {
|
|||||||
const storageSpace =
|
const storageSpace =
|
||||||
customQuota >= 0 ? `${usedStorage}/${maxStorage}` : `${usedStorage}`;
|
customQuota >= 0 ? `${usedStorage}/${maxStorage}` : `${usedStorage}`;
|
||||||
|
|
||||||
|
const sideColor = theme?.management?.sideColor;
|
||||||
|
const nameColor = theme?.management?.nameColor;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledRowContent
|
<StyledRowContent
|
||||||
sectionWidth={"620px"}
|
sectionWidth={"620px"}
|
||||||
sideColor="#A3A9AE"
|
sideColor={sideColor}
|
||||||
nameColor="#D0D5DA"
|
nameColor={nameColor}
|
||||||
className="spaces_row-content"
|
className="spaces_row-content"
|
||||||
>
|
>
|
||||||
<div className="user-container-wrapper">
|
<div className="user-container-wrapper">
|
||||||
|
@ -68,7 +68,7 @@ type TRow = {
|
|||||||
const SpacesRoomRow = ({ item }: TRow) => {
|
const SpacesRoomRow = ({ item }: TRow) => {
|
||||||
const { spacesStore, settingsStore } = useStore();
|
const { spacesStore, settingsStore } = useStore();
|
||||||
const { setDeletePortalDialogVisible, setCurrentPortal } = spacesStore;
|
const { setDeletePortalDialogVisible, setCurrentPortal } = spacesStore;
|
||||||
const { tenantAlias, getAllPortals } = settingsStore;
|
const { tenantAlias, getAllPortals, theme } = settingsStore;
|
||||||
|
|
||||||
const [isVisibleDialog, setIsVisibleDialog] = useState(false);
|
const [isVisibleDialog, setIsVisibleDialog] = useState(false);
|
||||||
const [isDisableQuota, setIsDisableQuota] = useState(false);
|
const [isDisableQuota, setIsDisableQuota] = useState(false);
|
||||||
@ -152,6 +152,7 @@ const SpacesRoomRow = ({ item }: TRow) => {
|
|||||||
element={logoElement}
|
element={logoElement}
|
||||||
key={item.id}
|
key={item.id}
|
||||||
data={item}
|
data={item}
|
||||||
|
theme={theme}
|
||||||
>
|
>
|
||||||
<RoomContent item={item} isCurrentPortal={isCurrentPortal} />
|
<RoomContent item={item} isCurrentPortal={isCurrentPortal} />
|
||||||
</StyledRoomRow>
|
</StyledRoomRow>
|
||||||
|
Loading…
Reference in New Issue
Block a user