diff --git a/site/src/components/DeploySettingsLayout/Option.tsx b/site/src/components/DeploySettingsLayout/Option.tsx index 6db042e7f0870..38c6bc7b7b89f 100644 --- a/site/src/components/DeploySettingsLayout/Option.tsx +++ b/site/src/components/DeploySettingsLayout/Option.tsx @@ -1,6 +1,6 @@ import CheckCircleOutlined from "@mui/icons-material/CheckCircleOutlined"; import { css, useTheme } from "@emotion/react"; -import type { HTMLAttributes, PropsWithChildren, FC } from "react"; +import { type HTMLAttributes, type PropsWithChildren, type FC } from "react"; import { MONOSPACE_FONT_FAMILY } from "theme/constants"; import { DisabledBadge, EnabledBadge } from "../Badges/Badges"; @@ -104,68 +104,61 @@ export const OptionValue: FC = (props) => { return {JSON.stringify(value)}; }; -interface OptionConfigProps extends HTMLAttributes { - source?: boolean; -} +type OptionConfigProps = HTMLAttributes & { isSource: boolean }; -// OptionConfig takes a source bool to indicate if the Option is the source of the configured value. -export const OptionConfig: FC = ({ - children, - source, - ...attrs -}) => { +// OptionConfig takes a isSource bool to indicate if the Option is the source of the configured value. +export const OptionConfig = ({ isSource, ...attrs }: OptionConfigProps) => { const theme = useTheme(); - const borderColor = source ? undefined : theme.palette.divider; + const borderColor = isSource + ? theme.experimental.roles.active.outline + : theme.palette.divider; return (
- {children} -
+ css={[ + { + fontSize: 13, + fontFamily: MONOSPACE_FONT_FAMILY, + fontWeight: 600, + backgroundColor: theme.palette.background.paper, + display: "inline-flex", + alignItems: "center", + borderRadius: 4, + padding: 6, + lineHeight: 1, + gap: 6, + border: `1px solid ${borderColor}`, + }, + isSource + ? { + "& .OptionConfigFlag": { + background: theme.experimental.roles.active.fill, + }, + } + : undefined, + ]} + /> ); }; -interface OptionConfigFlagProps extends HTMLAttributes { - source?: boolean; -} - -export const OptionConfigFlag: FC = ({ - children, - source, - ...attrs -}) => { +export const OptionConfigFlag = (props: HTMLAttributes) => { const theme = useTheme(); return (
- {children} -
+ /> ); }; diff --git a/site/src/components/DeploySettingsLayout/OptionsTable.tsx b/site/src/components/DeploySettingsLayout/OptionsTable.tsx index 57ae0729a39d7..3f66d27309eda 100644 --- a/site/src/components/DeploySettingsLayout/OptionsTable.tsx +++ b/site/src/components/DeploySettingsLayout/OptionsTable.tsx @@ -70,25 +70,25 @@ const OptionsTable: FC = ({ options, additionalValues }) => { }} > {option.flag && ( - + CLI --{option.flag} )} {option.flag_shorthand && ( - + CLI- {option.flag_shorthand} )} {option.env && ( - + ENV {option.env} )} {option.yaml && ( - + YAML {option.yaml}