forked from apache/superset
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Removes the CSS files from the Rose plugin (apache#19473)
- Loading branch information
1 parent
d177868
commit f405875
Showing
5 changed files
with
77 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
superset-frontend/plugins/legacy-plugin-chart-rose/src/ReactRose.js
This file was deleted.
Oops, something went wrong.
75 changes: 75 additions & 0 deletions
75
superset-frontend/plugins/legacy-plugin-chart-rose/src/ReactRose.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/** | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
import React from 'react'; | ||
import { reactify, styled, css } from '@superset-ui/core'; | ||
import { Global } from '@emotion/react'; | ||
import Component from './Rose'; | ||
|
||
const ReactComponent = reactify(Component); | ||
|
||
const Rose = ({ className, ...otherProps }) => ( | ||
<div className={className}> | ||
<Global | ||
styles={theme => css` | ||
.tooltip { | ||
line-height: 1; | ||
padding: ${theme.gridUnit * 3}px; | ||
background: ${theme.colors.grayscale.dark2}; | ||
color: ${theme.colors.grayscale.light5}; | ||
border-radius: 4px; | ||
pointer-events: none; | ||
z-index: 1000; | ||
font-size: ${theme.typography.sizes.s}px; | ||
} | ||
`} | ||
/> | ||
<ReactComponent {...otherProps} /> | ||
</div> | ||
); | ||
|
||
export default styled(Rose)` | ||
${({ theme }) => ` | ||
.superset-legacy-chart-rose path { | ||
transition: fill-opacity 180ms linear; | ||
stroke: ${theme.colors.grayscale.light5}; | ||
stroke-width: 1px; | ||
stroke-opacity: 1; | ||
fill-opacity: 0.75; | ||
} | ||
.superset-legacy-chart-rose text { | ||
font-weight: ${theme.typography.weights.normal}; | ||
font-size: ${theme.typography.sizes.s}px; | ||
font-family: ${theme.typography.families.sansSerif}; | ||
pointer-events: none; | ||
} | ||
.superset-legacy-chart-rose .clickable path { | ||
cursor: pointer; | ||
} | ||
.superset-legacy-chart-rose .hover path { | ||
fill-opacity: 1; | ||
} | ||
.nv-legend .nv-series { | ||
cursor: pointer; | ||
} | ||
`} | ||
`; |
43 changes: 0 additions & 43 deletions
43
superset-frontend/plugins/legacy-plugin-chart-rose/src/Rose.css
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters