mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-05 15:17:48 +02:00
FEATURE: Add "Recent Errors" tab and improved error modal (#2169)
This commit is contained in:
committed by
GitHub
parent
cf72937faf
commit
18f84396e2
@@ -7,6 +7,7 @@ type OptionSwitchProps = {
|
||||
onChange: (newValue: boolean, error?: string) => void;
|
||||
text: React.ReactNode;
|
||||
tooltip: React.ReactNode;
|
||||
wrapperStyles?: React.CSSProperties;
|
||||
};
|
||||
|
||||
export function OptionSwitch({
|
||||
@@ -15,6 +16,7 @@ export function OptionSwitch({
|
||||
onChange,
|
||||
text,
|
||||
tooltip,
|
||||
wrapperStyles,
|
||||
}: OptionSwitchProps): React.ReactElement {
|
||||
const [value, setValue] = useState(checked);
|
||||
|
||||
@@ -29,7 +31,7 @@ export function OptionSwitch({
|
||||
}, [checked]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div style={wrapperStyles}>
|
||||
<FormControlLabel
|
||||
disabled={disabled}
|
||||
control={<Switch checked={value} onChange={handleSwitchChange} />}
|
||||
@@ -39,7 +41,6 @@ export function OptionSwitch({
|
||||
</Tooltip>
|
||||
}
|
||||
/>
|
||||
<br />
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user