Skip to content

Commit ebdb62f

Browse files
author
cchaos
committed
Fixes, tests, and CL
1 parent 72900e7 commit ebdb62f

File tree

6 files changed

+54
-4
lines changed

6 files changed

+54
-4
lines changed

src/components/badge/beta_badge/__snapshots__/beta_badge.test.tsx.snap

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,18 @@ exports[`EuiBetaBadge props size s is rendered 1`] = `
5555
Beta
5656
</span>
5757
`;
58+
59+
exports[`EuiBetaBadge props tooltip and anchorProps are rendered 1`] = `
60+
<span
61+
class="euiToolTipAnchor customAnchorClass"
62+
data-test-subj="DTS"
63+
>
64+
<span
65+
class="euiBetaBadge euiBetaBadge--hollow"
66+
role="button"
67+
tabindex="0"
68+
>
69+
Beta
70+
</span>
71+
</span>
72+
`;

src/components/badge/beta_badge/beta_badge.test.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,20 @@ describe('EuiBetaBadge', () => {
3939
});
4040
});
4141
});
42+
43+
test('tooltip and anchorProps are rendered', () => {
44+
const component = render(
45+
<EuiBetaBadge
46+
label="Beta"
47+
tooltipContent="Tooltip"
48+
anchorProps={{
49+
className: 'customAnchorClass',
50+
'data-test-subj': 'DTS',
51+
}}
52+
/>
53+
);
54+
55+
expect(component).toMatchSnapshot();
56+
});
4257
});
4358
});

src/components/card/__snapshots__/card.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ exports[`EuiCard props paddingSize xl is rendered 1`] = `
853853

854854
exports[`EuiCard props paddingSize xs is rendered 1`] = `
855855
<div
856-
class="euiPanel euiPanel--plain euiCard euiCard--centerAligned css-fqiy6-euiPanel-grow-m-xs-plain-hasShadow-euiCard-center-vertical"
856+
class="euiPanel euiPanel--plain euiCard euiCard--centerAligned emotion-euiPanel-grow-m-xs-plain-hasShadow-euiCard-center-vertical"
857857
>
858858
<div
859859
class="euiCard__content emotion-euiCard__content-vertical"

src/components/card/card_select/card_select.styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import { css } from '@emotion/react';
1010

11-
export const euiCheckableCardStyles = () => {
11+
export const euiCardSelectStyles = () => {
1212
return {
1313
euiCardSelect: css`
1414
transform: none !important;

src/components/card/card_select/card_select.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import React, { FunctionComponent, ReactNode } from 'react';
1010

1111
import { EuiI18n } from '../../i18n';
1212
import { EuiButton, Props } from '../../button/button';
13-
import { euiCheckableCardStyles } from './card_select.styles';
13+
import { euiCardSelectStyles } from './card_select.styles';
1414

1515
export type EuiCardSelectProps = Props;
1616

@@ -22,7 +22,7 @@ export const EuiCardSelect: FunctionComponent<EuiCardSelectProps> = ({
2222
children,
2323
...rest
2424
}) => {
25-
const styles = euiCheckableCardStyles();
25+
const styles = euiCardSelectStyles();
2626
const baseCSS = [styles.euiCardSelect];
2727

2828
const child = euiCardSelectableText(

upcoming_changelogs/6110.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
- Added `anchorProps` to allow passing more props to the anchoring wrapper in `EuiToolTip` and `EuiBetaBadge`
2+
- Added an empty shade background color to `hollow` style `EuiBetaBadge`
3+
- Changed design of select button in `selectable` `EuiCard`s
4+
5+
**Bug fixes**
6+
7+
- Fixed ...
8+
9+
**Deprecations**
10+
11+
- Deprecated ...
12+
13+
**Breaking changes**
14+
15+
- Removed ...
16+
17+
**CSS-in-JS conversions**
18+
19+
- Removed `euiHasBetaBadge()` Sass mixin
20+
- Converted `EuiCard`, `EuiCheckableCard` to Emotion, removed `$euiCheckableCardPadding`, `$euiCardSpacing`, `$euiCardBottomNodeHeight`, `$euiCardSelectButtonBorders`, `$euiCardSelectButtonBackgrounds`, and `$euiCardPaddingModifiers`

0 commit comments

Comments
 (0)