Skip to content

Commit

Permalink
EuiTitle code review fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Theo committed Apr 11, 2019
1 parent 9a87e23 commit 6e17948
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/components/title/title.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { FunctionComponent, ReactElement } from 'react';
import classNames from 'classnames';
import { keysOf } from '../common';
import { CommonProps, keysOf } from '../common';

const titleSizeToClassNameMap = {
xxxs: 'euiTitle--xxxsmall',
Expand All @@ -21,14 +21,16 @@ const textTransformToClassNameMap = {
export const TEXT_TRANSFORM = keysOf(textTransformToClassNameMap);
export type EuiTitleTextTransform = keyof typeof textTransformToClassNameMap;

export interface EuiTitleProps {
children: ReactElement<any>;
className?: string;
size?: EuiTitleSize;
textTransform?: EuiTitleTextTransform;
}
export type EuiTitleProps = FunctionComponent<
CommonProps & {
children: ReactElement<any>;
className?: string;
size?: EuiTitleSize;
textTransform?: EuiTitleTextTransform;
}
>;

export const EuiTitle: FunctionComponent<EuiTitleProps> = ({
export const EuiTitle: EuiTitleProps = ({
size = 'm',
children,
className,
Expand Down

0 comments on commit 6e17948

Please sign in to comment.