Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EuiCode] and [EuiCodeBlock] updated the props #3647

Merged
merged 7 commits into from
Jun 25, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ No public interface changes since `26.0.1`.

## [`26.0.1`](https://github.com/elastic/eui/tree/v26.0.1)

- Updated props of `EuiCode` and `EuiCodeBlock` to reflect only functional props ([#3647](https://github.com/elastic/eui/pull/3647))

**Bug fixes**

- Fixed fullscreen render issue in `EuiCode` ([#3633](https://github.com/elastic/eui/pull/3633))
Expand Down
6 changes: 0 additions & 6 deletions src/components/code/code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,14 @@ import React, { FunctionComponent, HTMLAttributes } from 'react';

import { EuiCodeBlockImpl } from './_code_block';

export type FontSize = 's' | 'm' | 'l';
export type PaddingSize = 'none' | 's' | 'm' | 'l';

export interface EuiCodeSharedProps {
paddingSize?: PaddingSize;

/**
* Sets the syntax highlighting for a specific language
* @see http://highlightjs.readthedocs.io/en/latest/css-classes-reference.html#language-names-and-aliases
* for options
*/
language?: string;
overflowHeight?: number;
fontSize?: FontSize;
transparentBackground?: boolean;
isCopyable?: boolean;
thompsongl marked this conversation as resolved.
Show resolved Hide resolved
}
Expand Down
6 changes: 6 additions & 0 deletions src/components/code/code_block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@ import { CommonProps } from '../common';
import { EuiCodeBlockImpl } from './_code_block';
import { EuiCodeSharedProps } from './code';

export type FontSize = 's' | 'm' | 'l';
export type PaddingSize = 'none' | 's' | 'm' | 'l';
cchaos marked this conversation as resolved.
Show resolved Hide resolved

interface OwnProps extends EuiCodeSharedProps {
inline?: false;
paddingSize?: PaddingSize;
fontSize?: FontSize;
overflowHeight?: number;
}

export type EuiCodeBlockProps = CommonProps &
Expand Down