Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions packages/eui/changelogs/upcoming/9269.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Added `EuiSplitButton` and its respective sub-components `EuiSplitButton.ActionPrimary` and `EuiSplitButton.ActionSecondary`

Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export type EuiButtonIconPropsForButton = {
}
>;

type Props = ExclusiveUnion<
export type Props = ExclusiveUnion<
EuiButtonIconPropsForAnchor,
EuiButtonIconPropsForButton
>;
Expand Down
7 changes: 7 additions & 0 deletions packages/eui/src/components/button/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,10 @@ export type {
EuiButtonGroupProps,
} from './button_group';
export { EuiButtonGroup } from './button_group';

export type {
EuiSplitButtonProps,
EuiSplitButtonActionPrimaryProps,
EuiSplitButtonActionSecondaryProps,
} from './split_button';
export { EuiSplitButton } from './split_button';
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`EuiSplitButton renders 1`] = `
<div
class="euiSplitButton emotion-euiSplitButton"
role="group"
>
<button
class="euiButton euiSplitButtonActionPrimary emotion-euiButtonDisplay-m-defaultMinWidth-base-primary-euiSplitButtonActionPrimary"
data-test-subj="primary-action"
type="button"
>
<span
class="emotion-euiButtonDisplayContent"
>
<span
class="eui-textTruncate"
>
Primary Action
</span>
</span>
</button>
<div
aria-hidden="true"
class="euiSplitButton__divider css-1p9055z-divider"
/>
<button
aria-label="Secondary action"
class="euiButtonIcon euiSplitButtonActionSecondary emotion-euiButtonIcon-m-base-primary-euiSplitButtonActionSecondary"
data-test-subj="secondary-action"
type="button"
>
<span
aria-hidden="true"
class="euiButtonIcon__icon"
color="inherit"
data-euiicon-type="arrowDown"
/>
</button>
</div>
`;
18 changes: 18 additions & 0 deletions packages/eui/src/components/button/split_button/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

export type { EuiSplitButtonProps } from './split_button';
export { EuiSplitButton } from './split_button';
export type {
EuiSplitButtonActionPrimaryProps,
EuiSplitButtonActionSecondaryProps,
} from './split_button_actions';
export {
EuiSplitButtonActionPrimary,
EuiSplitButtonActionSecondary,
} from './split_button_actions';
Loading