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

Creating new CSS class: euiFlexGroup--justifyContentSpaceEvenly #205

Merged
Merged
Show file tree
Hide file tree
Changes from all 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: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [`master`](https://github.com/elastic/eui/tree/master)

No public interface changes since `0.0.5`.
- `justify` prop of `<EuiFlexGroup>` now accepts `spaceEvenly` [(#205)](https://github.com/elastic/eui/pull/205)

# [`0.0.5`](https://github.com/elastic/eui/tree/v0.0.5)

Expand Down
7 changes: 7 additions & 0 deletions src-docs/src/views/flex/flex_justify.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ import {

export default () => (
<div>
<EuiFlexGroup justifyContent="spaceEvenly">
<EuiFlexItem grow={false}>One here on the left</EuiFlexItem>
<EuiFlexItem grow={false}>The other over here on the right.</EuiFlexItem>
</EuiFlexGroup>

<EuiSpacer />

<EuiFlexGroup justifyContent="spaceBetween">
<EuiFlexItem grow={false}>One here on the left</EuiFlexItem>
<EuiFlexItem grow={false}>The other over here on the right.</EuiFlexItem>
Expand Down
6 changes: 6 additions & 0 deletions src/components/flex/__snapshots__/flex_group.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ exports[`EuiFlexGroup props justifyContent spaceBetween is rendered 1`] = `
/>
`;

exports[`EuiFlexGroup props justifyContent spaceEvenly is rendered 1`] = `
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--justifyContentSpaceEvenly euiFlexGroup--responsive"
/>
`;

exports[`EuiFlexGroup props responsive false is rendered 1`] = `
<div
class="euiFlexGroup euiFlexGroup--gutterLarge"
Expand Down
4 changes: 4 additions & 0 deletions src/components/flex/_flex_group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ $gutterTypes: (
}

// Justify the grid
.euiFlexGroup--justifyContentSpaceEvenly {
justify-content: space-evenly;
}

.euiFlexGroup--justifyContentSpaceBetween {
justify-content: space-between;
}
Expand Down
1 change: 1 addition & 0 deletions src/components/flex/flex_group.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const justifyContentToClassNameMap = {
center: 'euiFlexGroup--justifyContentCenter',
spaceBetween: 'euiFlexGroup--justifyContentSpaceBetween',
spaceAround: 'euiFlexGroup--justifyContentSpaceAround',
spaceEvenly: 'euiFlexGroup--justifyContentSpaceEvenly',
};

export const JUSTIFY_CONTENTS = Object.keys(justifyContentToClassNameMap);
Expand Down