mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 23:38:35 +02:00
set disabled color
This commit is contained in:
@@ -22,7 +22,10 @@ interface IColorEditorProps {
|
||||
}
|
||||
|
||||
function ColorEditor({ name, onColorChange, color, defaultColor }: IColorEditorProps): React.ReactElement {
|
||||
if (color === undefined) throw new Error("should not happen");
|
||||
if (color === undefined) {
|
||||
console.error(`color ${name} was undefined, reverting to default`);
|
||||
color = defaultColor;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -264,6 +267,12 @@ export function ThemeEditorModal(props: IProps): React.ReactElement {
|
||||
color={customTheme["rep"]}
|
||||
defaultColor={defaultSettings.theme["rep"]}
|
||||
/>
|
||||
<ColorEditor
|
||||
name="disabled"
|
||||
onColorChange={onColorChange}
|
||||
color={customTheme["disabled"]}
|
||||
defaultColor={defaultSettings.theme["disabled"]}
|
||||
/>
|
||||
<br />
|
||||
<br />
|
||||
<TextField label={"import / export theme"} value={JSON.stringify(customTheme)} onChange={onThemeChange} />
|
||||
|
||||
Reference in New Issue
Block a user