Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 committed Nov 2, 2020
1 parent 2575403 commit df33fa2
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
5 changes: 0 additions & 5 deletions src/plugins/charts/common/palette.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,4 @@ describe('system_palette', () => {
const result = fn(null, { name: 'test' });
expect(result).toHaveProperty('name', 'test');
});

it('passes params through', () => {
const result = fn(null, { name: 'test', params: { customProp: 123 } });
expect(result).toHaveProperty('params', { customProp: 123 });
});
});
7 changes: 0 additions & 7 deletions src/plugins/charts/common/palette.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export interface CustomPaletteState {

export interface SystemPaletteArguments {
name: string;
params?: unknown;
}

export interface PaletteOutput<T = unknown> {
Expand Down Expand Up @@ -158,17 +157,11 @@ export function systemPalette(): ExpressionFunctionDefinition<
'gray',
],
},
params: {
help: i18n.translate('charts.functions.systemPalette.args.paramsHelpText', {
defaultMessage: 'Palette specific params of the palette',
}),
},
},
fn: (input, args) => {
return {
type: 'palette',
name: args.name,
params: args.params,
};
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export function PalettePicker({
<>
<EuiColorPalettePicker
data-test-subj="lns-palettePicker"
compressed
palettes={palettes
.getAll()
.filter(({ internal }) => !internal)
Expand Down

0 comments on commit df33fa2

Please sign in to comment.