@carto/kepler.gl 0.0.15 → 0.0.16-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -50,8 +50,17 @@ function TextLabelPanelFactory(RangeSlider, LayerConfigGroup, FieldSelector) {
50
50
  updateLayerTextLabel: PropTypes.func.isRequired
51
51
  };
52
52
 
53
+ static defaultProps = {
54
+ AddButton: props => (
55
+ <Button {...props} link>
56
+ <Add height="12px" />
57
+ <FormattedMessage id="panel.text.addMoreLabel" />
58
+ </Button>
59
+ )
60
+ };
61
+
53
62
  render() {
54
- const {updateLayerTextLabel, textLabel, fields} = this.props;
63
+ const {updateLayerTextLabel, textLabel, fields, AddButton} = this.props;
55
64
  const currentFields = textLabel.map(tl => tl.field && tl.field.name).filter(d => d);
56
65
  return (
57
66
  <LayerConfigGroup label={'panel.text.label'} collapsible>
@@ -65,7 +74,10 @@ function TextLabelPanelFactory(RangeSlider, LayerConfigGroup, FieldSelector) {
65
74
  </ConfigGroupCollapsibleHeader>
66
75
  <ConfigGroupCollapsibleContent>
67
76
  {textLabel.map((tl, idx) => (
68
- <div key={tl.field ? tl.field.name : `null-${idx}`}>
77
+ <div
78
+ key={tl.field ? tl.field.name : `null-${idx}`}
79
+ className="side-panel-section-group"
80
+ >
69
81
  <PanelLabel>
70
82
  <FormattedMessage id={'panel.text.labelWithId'} values={{labelId: idx + 1}} />
71
83
  </PanelLabel>
@@ -129,10 +141,7 @@ function TextLabelPanelFactory(RangeSlider, LayerConfigGroup, FieldSelector) {
129
141
  </div>
130
142
  ))}
131
143
  <SidePanelSection>
132
- <Button link onClick={val => updateLayerTextLabel(textLabel.length)}>
133
- <Add height="12px" />
134
- <FormattedMessage id="panel.text.addMoreLabel" />
135
- </Button>
144
+ <AddButton onClick={val => updateLayerTextLabel(textLabel.length)} />
136
145
  </SidePanelSection>
137
146
  </ConfigGroupCollapsibleContent>
138
147
  </LayerConfigGroup>
@@ -439,6 +439,11 @@ export default {
439
439
  type: 'type',
440
440
  reversed: 'reversed'
441
441
  },
442
+ customPalette: {
443
+ apply: 'Apply',
444
+ cancel: 'Cancel',
445
+ addStep: '+ Add Step'
446
+ },
442
447
  scale: {
443
448
  colorScale: 'Color Scale',
444
449
  sizeScale: 'Size Scale',