mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 11:05:39 -04:00
[Graph/SCSS] Migrate _venn_diagram.scss
file to Emotion (#214962)
## Summary Part of https://github.com/elastic/kibana/issues/208908 Replaces `_venn_diagram.scss` file to css-in-js . ## Screenshots <img width="1593" alt="Screenshot 2025-03-18 at 12 50 55" src="https://github.com/user-attachments/assets/f6685a78-15ce-4019-992a-9388efb79fab" /> <img width="1586" alt="Screenshot 2025-03-18 at 12 50 36" src="https://github.com/user-attachments/assets/b1f57d53-509d-43c3-9a96-99ebacba35a1" /> ### Checklist - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
This commit is contained in:
parent
856b222142
commit
4f9c54f91b
4 changed files with 17 additions and 11 deletions
|
@ -3,7 +3,6 @@
|
||||||
@import './source_modal';
|
@import './source_modal';
|
||||||
@import './guidance_panel/index';
|
@import './guidance_panel/index';
|
||||||
@import './graph_visualization/index';
|
@import './graph_visualization/index';
|
||||||
@import './venn_diagram/index';
|
|
||||||
@import './settings/index';
|
@import './settings/index';
|
||||||
@import './field_manager/index';
|
@import './field_manager/index';
|
||||||
@import './graph';
|
@import './graph';
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
@import './venn_diagram';
|
|
|
@ -1,9 +0,0 @@
|
||||||
.gphVennDiagram__left {
|
|
||||||
fill: $euiColorDanger;
|
|
||||||
fill-opacity: .5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.gphVennDiagram__right {
|
|
||||||
fill: $euiColorPrimary;
|
|
||||||
fill-opacity: .5;
|
|
||||||
}
|
|
|
@ -6,6 +6,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { css } from '@emotion/react';
|
||||||
|
import { type UseEuiTheme } from '@elastic/eui';
|
||||||
import { distanceFromIntersectArea } from './vennjs';
|
import { distanceFromIntersectArea } from './vennjs';
|
||||||
|
|
||||||
export interface VennDiagramProps {
|
export interface VennDiagramProps {
|
||||||
|
@ -45,15 +47,30 @@ export function VennDiagram({ leftValue, rightValue, overlap }: VennDiagramProps
|
||||||
cy={maxRadius}
|
cy={maxRadius}
|
||||||
r={leftRadius}
|
r={leftRadius}
|
||||||
className="gphVennDiagram__left"
|
className="gphVennDiagram__left"
|
||||||
|
css={styles.left}
|
||||||
/>
|
/>
|
||||||
<circle
|
<circle
|
||||||
cx={rightCenter + padding}
|
cx={rightCenter + padding}
|
||||||
cy={maxRadius}
|
cy={maxRadius}
|
||||||
r={rightRadius}
|
r={rightRadius}
|
||||||
className="gphVennDiagram__right"
|
className="gphVennDiagram__right"
|
||||||
|
css={styles.right}
|
||||||
/>
|
/>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const styles = {
|
||||||
|
left: ({ euiTheme }: UseEuiTheme) =>
|
||||||
|
css`
|
||||||
|
fill: ${euiTheme.colors.danger};
|
||||||
|
fill-opacity: 0.5;
|
||||||
|
`,
|
||||||
|
|
||||||
|
right: ({ euiTheme }: UseEuiTheme) => css`
|
||||||
|
fill: ${euiTheme.colors.primary};
|
||||||
|
fill-opacity: 0.5;
|
||||||
|
`,
|
||||||
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue