Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add diff color to config option when it is source
  • Loading branch information
BrunoQuaresma committed Sep 29, 2023
commit 6ce3af7ef63c6d337d2e70a38ad6631fe424873f
5 changes: 5 additions & 0 deletions site/src/components/DeploySettingsLayout/Option.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { PropsWithChildren, FC } from "react";
import { MONOSPACE_FONT_FAMILY } from "theme/constants";
import { DisabledBadge, EnabledBadge } from "./Badges";
import Box, { BoxProps } from "@mui/material/Box";
import { combineClasses } from "utils/combineClasses";

export const OptionName: FC<PropsWithChildren> = ({ children }) => {
const styles = useStyles();
Expand Down Expand Up @@ -82,6 +83,9 @@ export const OptionConfig = ({
`1px solid ${
source ? theme.palette.primary.main : theme.palette.divider
}`,
"& .option-config-flag": {
backgroundColor: source ? "rgba(0, 0, 0, 0.7)" : undefined,
},
...boxProps.sx,
}}
/>
Expand All @@ -92,6 +96,7 @@ export const OptionConfigFlag = (props: BoxProps) => {
return (
<Box
{...props}
className={combineClasses([props.className, "option-config-flag"])}
sx={{
fontSize: 10,
fontWeight: 600,
Expand Down