Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

**Bug fixes**

- Fixed `EuiTitle` not rendering child classes ([#2926](https://github.com/elastic/eui/pull/2926))
- Fixed building dev & docs on Windows ([#2847](https://github.com/elastic/eui/pull/2847))
- Fixed screen reader discovery issues with `EuiBottomBar` and `EuiControlBar` ([#2861](https://github.com/elastic/eui/pull/2861))
- Fixed a bug in `EuiDataGrid` causing the first cell to autofocus if interactive ([#2872](https://github.com/elastic/eui/pull/2872))
Expand Down
10 changes: 10 additions & 0 deletions src/components/title/__snapshots__/title.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,13 @@ exports[`EuiTitle is rendered 1`] = `
Title
</h1>
`;

exports[`EuiTitle renders children element className 1`] = `
<h1
aria-label="aria-label"
class="euiTitle euiTitle--medium testClass1 testClass2 test"
data-test-subj="test subject string"
>
Title
</h1>
`;
10 changes: 10 additions & 0 deletions src/components/title/title.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,14 @@ describe('EuiTitle', () => {

expect(component).toMatchSnapshot();
});

test('renders children element className', () => {
const component = render(
<EuiTitle {...requiredProps}>
<h1 className="test">Title</h1>
</EuiTitle>
);

expect(component).toMatchSnapshot();
});
});
3 changes: 2 additions & 1 deletion src/components/title/title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ export const EuiTitle: FunctionComponent<EuiTitleProps> = ({
'euiTitle',
titleSizeToClassNameMap[size],
textTransform ? textTransformToClassNameMap[textTransform] : undefined,
className
className,
children.props.className
);

const props = {
Expand Down