rusackas commented on a change in pull request #12920:
URL: https://github.com/apache/superset/pull/12920#discussion_r578218748
##########
File path:
superset-frontend/src/explore/components/controls/FixedOrMetricControl.jsx
##########
@@ -107,67 +100,88 @@ export default class FixedOrMetricControl extends
React.Component {
return (
<div>
<ControlHeader {...this.props} />
- <Label onClick={this.toggle}>
- {this.state.type === controlTypes.fixed && (
- <span>{this.state.fixedValue}</span>
- )}
- {this.state.type === controlTypes.metric && (
- <span>
- <span style={{ fontWeight: 'normal' }}>metric: </span>
- <strong>
- {this.state.metricValue ? this.state.metricValue.label : null}
- </strong>
- </span>
- )}
- </Label>
- <Panel
- className="panel-spreaded"
- collapsible
- expanded={this.state.expanded}
- onToggle={this.toggle}
+ <Collapse
+ ghost
+ css={css`
+ &.ant-collapse
+ > .ant-collapse-item.ant-collapse-no-arrow
+ > .ant-collapse-header {
+ border: 0px;
+ padding: 0px 0px 8px 0px;
+ display: inline-block;
+ }
+ &.ant-collapse-ghost
+ > .ant-collapse-item
+ > .ant-collapse-content
+ > .ant-collapse-content-box {
+ padding: 0px;
+
+ & .well {
+ margin-bottom: 0px;
+ padding: 8px;
+ }
+ }
+ `}
>
- <Panel.Collapse>
- <Panel.Body>
- <div className="well">
- <PopoverSection
- title="Fixed"
- isSelected={type === controlTypes.fixed}
- onSelect={() => {
+ <Collapse.Panel
+ showArrow={false}
+ header={
+ <Label onClick={() => undefined}>
+ {this.state.type === controlTypes.fixed && (
+ <span>{this.state.fixedValue}</span>
+ )}
+ {this.state.type === controlTypes.metric && (
+ <span>
+ <span style={{ fontWeight: 'normal' }}>metric: </span>
Review comment:
This looks like it would be normal font weight, and not need this
`style` prop. But if it _does_ need an override, it might be nice to use the
`css` prop and pull in `theme.typography.weights.normal` here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]