diff --git a/CHANGELOG.md b/CHANGELOG.md index 96cfa584a36..7faf8f63e01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ## [`master`](https://github.com/elastic/eui/tree/master) -No public interface changes since `6.7.3`. +- Added `textAlign` property to TypeScript definition for `EuiText` ([#1487](https://github.com/elastic/eui/pull/1487)) +- Added missing `'m'` option for text `size` for `EuiText`'s TypeScript definition ([#1487](https://github.com/elastic/eui/pull/1487)) +- Added missing TypeScript definition for `EuiTextAlign` ([#1487](https://github.com/elastic/eui/pull/1487)) ## [`6.7.3`](https://github.com/elastic/eui/tree/v6.7.3) diff --git a/src/components/text/index.d.ts b/src/components/text/index.d.ts index b7951d87dd9..10aec05c95c 100644 --- a/src/components/text/index.d.ts +++ b/src/components/text/index.d.ts @@ -8,7 +8,15 @@ declare module '@elastic/eui' { * @see './text.js' * @see './text_color.js' */ - type TEXT_SIZES = 's' | 'xs'; + type TEXT_SIZES = 'm' | 's' | 'xs'; + + /** + * text alignment options + * + * @see './text.js' + * @see './text_align.js' + */ + type ALIGNMENTS = 'left' | 'center' | 'right'; type COLORS = | 'default' @@ -19,8 +27,12 @@ declare module '@elastic/eui' { | 'warning' | 'ghost'; - type EuiTextProps = CommonProps & + type EuiTextAlignProps = CommonProps & HTMLAttributes & { + textAlign?: ALIGNMENTS; + }; + + type EuiTextProps = EuiTextAlignProps & { size?: TEXT_SIZES; color?: COLORS; grow?: boolean; @@ -32,6 +44,9 @@ declare module '@elastic/eui' { color?: COLORS; }; + + export const EuiText: SFC; + export const EuiTextAlign: SFC; export const EuiTextColor: SFC; }