diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fb899c4736..9eb464b9149 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## [`master`](https://github.com/elastic/eui/tree/master) +- Exported `EuiTextProps` type definition ([#3039](https://github.com/elastic/eui/pull/3039)) - Added `prepend` and `append` ability to `EuiComboBox` single selection only ([#3003](https://github.com/elastic/eui/pull/3003)) **Bug Fixes** diff --git a/src/components/text/index.ts b/src/components/text/index.ts index 96b5ed21444..9adab989ccc 100644 --- a/src/components/text/index.ts +++ b/src/components/text/index.ts @@ -1,3 +1,3 @@ -export { EuiText } from './text'; +export { EuiText, EuiTextProps } from './text'; export { EuiTextColor } from './text_color'; export { EuiTextAlign } from './text_align'; diff --git a/src/components/text/text.tsx b/src/components/text/text.tsx index 8743015cac1..039ead6b0d9 100644 --- a/src/components/text/text.tsx +++ b/src/components/text/text.tsx @@ -16,7 +16,7 @@ export type TextSize = keyof typeof textSizeToClassNameMap; export const TEXT_SIZES = keysOf(textSizeToClassNameMap); -type Props = CommonProps & +export type EuiTextProps = CommonProps & Omit, 'color'> & { textAlign?: TextAlignment; size?: TextSize; @@ -24,7 +24,7 @@ type Props = CommonProps & grow?: boolean; }; -export const EuiText: FunctionComponent = ({ +export const EuiText: FunctionComponent = ({ size = 'm', color, grow = true,