-
Notifications
You must be signed in to change notification settings - Fork 844
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EuiResizableButton] Add new
indicator
style prop (#7455)
- Loading branch information
Showing
11 changed files
with
309 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- Updated `EuiResizableButton` to allow customizing the `indicator` style with either `handle` (default) or `border` |
51 changes: 51 additions & 0 deletions
51
src-docs/src/views/resizable_container/resizable_button_indicator.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import React from 'react'; | ||
import { EuiText, EuiResizableContainer } from '../../../../src/components'; | ||
import { faker } from '@faker-js/faker'; | ||
|
||
const text = ( | ||
<> | ||
<p>{faker.lorem.paragraphs()}</p> | ||
<p>{faker.lorem.paragraphs()}</p> | ||
<p>{faker.lorem.paragraphs()}</p> | ||
</> | ||
); | ||
|
||
export default () => ( | ||
<EuiResizableContainer style={{ height: '300px' }}> | ||
{(EuiResizablePanel, EuiResizableButton) => ( | ||
<> | ||
<EuiResizablePanel initialSize={50} minSize="50px" tabIndex={0}> | ||
<EuiText>{text}</EuiText> | ||
</EuiResizablePanel> | ||
|
||
<EuiResizableButton indicator="border" /> | ||
|
||
<EuiResizablePanel | ||
initialSize={50} | ||
minSize="50px" | ||
tabIndex={0} | ||
paddingSize="none" | ||
> | ||
<EuiResizableContainer | ||
direction="vertical" | ||
style={{ height: '100%', overflow: 'hidden' }} | ||
> | ||
{(EuiResizablePanel, EuiResizableButton) => ( | ||
<> | ||
<EuiResizablePanel initialSize={50} minSize="50px" tabIndex={0}> | ||
<EuiText>{text}</EuiText> | ||
</EuiResizablePanel> | ||
|
||
<EuiResizableButton indicator="border" /> | ||
|
||
<EuiResizablePanel initialSize={50} minSize="50px" tabIndex={0}> | ||
<EuiText>{text}</EuiText> | ||
</EuiResizablePanel> | ||
</> | ||
)} | ||
</EuiResizableContainer> | ||
</EuiResizablePanel> | ||
</> | ||
)} | ||
</EuiResizableContainer> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.