diff --git a/viz-lib/src/visualizations/funnel/Editor/ColorsSettings.tsx b/viz-lib/src/visualizations/funnel/Editor/ColorsSettings.tsx new file mode 100644 index 0000000000..585ea7cb27 --- /dev/null +++ b/viz-lib/src/visualizations/funnel/Editor/ColorsSettings.tsx @@ -0,0 +1,31 @@ +import React from "react"; +import { useDebouncedCallback } from "use-debounce"; +import { Section, ColorPicker } from "@/components/visualizations/editor"; +import { EditorPropTypes } from "@/visualizations/prop-types"; +import ColorPalette from "../../ColorPalette"; + +export default function ColorsSettings({ options, onOptionsChange }: any) { + const [onOptionsChangeDebounced] = useDebouncedCallback(onOptionsChange, 200); + + return ( + + {/* @ts-expect-error ts-migrate(2745) FIXME: This JSX tag's 'children' prop expects type 'never... Remove this comment to see the full error message */} +
+ onOptionsChange({ color: color })} + // @ts-expect-error ts-migrate(2339) FIXME: Property 'Label' does not exist on type '({ classN... Remove this comment to see the full error message + addonAfter={} + /> +
+
+ ); +} + +ColorsSettings.propTypes = EditorPropTypes; diff --git a/viz-lib/src/visualizations/funnel/Editor/index.ts b/viz-lib/src/visualizations/funnel/Editor/index.ts index 1b70003a5b..e8eac120f0 100644 --- a/viz-lib/src/visualizations/funnel/Editor/index.ts +++ b/viz-lib/src/visualizations/funnel/Editor/index.ts @@ -2,8 +2,10 @@ import createTabbedEditor from "@/components/visualizations/editor/createTabbedE import GeneralSettings from "./GeneralSettings"; import AppearanceSettings from "./AppearanceSettings"; +import ColorsSettings from "./ColorsSettings"; export default createTabbedEditor([ { key: "General", title: "General", component: GeneralSettings }, { key: "Appearance", title: "Appearance", component: AppearanceSettings }, + { key: "Colors", title: "Colors", component: ColorsSettings }, ]); diff --git a/viz-lib/src/visualizations/funnel/Renderer/index.tsx b/viz-lib/src/visualizations/funnel/Renderer/index.tsx index 9a56bdeb5b..9f4d17a8b4 100644 --- a/viz-lib/src/visualizations/funnel/Renderer/index.tsx +++ b/viz-lib/src/visualizations/funnel/Renderer/index.tsx @@ -60,7 +60,7 @@ export default function Renderer({ data, options }: any) { align: "center", render: (value: any, item: any) => ( // @ts-expect-error ts-migrate(2745) FIXME: This JSX tag's 'children' prop expects type 'never... Remove this comment to see the full error message - + {formatValue(value)} ),