(
key: K,
nestedKey: string,
value: any
)
| 51 | }; |
| 52 | |
| 53 | const updateNestedSetting = <K extends keyof ChartSettings>( |
| 54 | key: K, |
| 55 | nestedKey: string, |
| 56 | value: any |
| 57 | ) => { |
| 58 | const nestedSettings = settings[key] as any; |
| 59 | onSettingsChange({ |
| 60 | ...settings, |
| 61 | [key]: { |
| 62 | ...nestedSettings, |
| 63 | [nestedKey]: value, |
| 64 | }, |
| 65 | }); |
| 66 | }; |
| 67 | |
| 68 | const addCustomColor = () => { |
| 69 | if (customColor && !settings.customColors.includes(customColor)) { |
no outgoing calls
no test coverage detected