Skip to content

Commit

Permalink
Fixed EuiTextColor props (#4058)
Browse files Browse the repository at this point in the history
  • Loading branch information
TAYTS authored Sep 21, 2020
1 parent 7807b7c commit 74fffda
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
- Added footer row to `EuiDataGrid` via the `renderFooterCellValue` prop ([#3770](https://github.com/elastic/eui/pull/3770))
- Added column header menu to `EuiDataGrid` ([#3087](https://github.com/elastic/eui/pull/3087))

**Bug fixes**

- Fixed `EuiTextColor` playground error due to `color` prop not getting captured by the documentation generator ([#4058](https://github.com/elastic/eui/pull/4058))

## [`29.0.0`](https://github.com/elastic/eui/tree/v29.0.0)

- Added `.browserslistrc` for global browser support reference ([#4022](https://github.com/elastic/eui/pull/4022))
Expand Down
9 changes: 6 additions & 3 deletions src/components/text/text_color.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ export type TextColor = keyof typeof colorsToClassNameMap;
export const COLORS = keysOf(colorsToClassNameMap);

type Props = CommonProps &
HTMLAttributes<HTMLDivElement> &
HTMLAttributes<HTMLSpanElement> & {
Omit<
HTMLAttributes<HTMLDivElement> & HTMLAttributes<HTMLSpanElement>,
'color'
> & {
color?: TextColor;
/**
* Determines the root element
Expand All @@ -49,14 +51,15 @@ export const EuiTextColor: FunctionComponent<Props> = ({
children,
color = 'default',
className,
component: Component = 'span',
component = 'span',
...rest
}) => {
const classes = classNames(
'euiTextColor',
colorsToClassNameMap[color],
className
);
const Component = component;

return (
<Component className={classes} {...rest}>
Expand Down

0 comments on commit 74fffda

Please sign in to comment.