Skip to content

Commit

Permalink
exports entire props definition for EuiCodeBlock
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitropoulos committed Feb 19, 2020
1 parent 8d2c601 commit 15cbc88
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/components/code/code_block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@ import { CommonProps } from '../common';
import { EuiCodeBlockImpl } from './_code_block';
import { EuiCodeSharedProps } from './code';

export interface EuiCodeBlockProps extends EuiCodeSharedProps {
interface OwnProps extends EuiCodeSharedProps {
inline?: false;
}

type Props = CommonProps & EuiCodeBlockProps & HTMLAttributes<HTMLElement>;
export type EuiCodeBlockProps = CommonProps &
OwnProps &
HTMLAttributes<HTMLElement>;

export const EuiCodeBlock: FunctionComponent<Props> = ({ inline, ...rest }) => {
export const EuiCodeBlock: FunctionComponent<EuiCodeBlockProps> = ({
inline,
...rest
}) => {
return <EuiCodeBlockImpl inline={false} {...rest} />;
};

0 comments on commit 15cbc88

Please sign in to comment.