-
Notifications
You must be signed in to change notification settings - Fork 840
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EuiAccordion] Allow interactive content within the
buttonContent
(#…
…5258) * Make accordion arrows always EuiButtonIcons * Added `element` and `buttonElement` to customize HTML elements * Added `arrowProps` so collapsible group could change its color for dark * Hard coded example of stopPropagation
- Loading branch information
Showing
16 changed files
with
972 additions
and
446 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
File renamed without changes.
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,29 @@ | ||
import React from 'react'; | ||
|
||
import { EuiAccordion, EuiLink, EuiPanel } from '../../../../src/components'; | ||
import { useGeneratedHtmlId } from '../../../../src/services'; | ||
|
||
export default () => { | ||
const buttonElementAccordionId = useGeneratedHtmlId({ | ||
prefix: 'buttonElementAccordion', | ||
}); | ||
|
||
return ( | ||
<EuiAccordion | ||
id={buttonElementAccordionId} | ||
buttonElement="div" | ||
buttonContent={ | ||
<EuiLink | ||
onClick={(e) => e.stopPropagation()} | ||
href="#/layout/accordion#interactive-content-in-the-trigger" | ||
> | ||
This is a nested link | ||
</EuiLink> | ||
} | ||
> | ||
<EuiPanel color="subdued"> | ||
Any content inside of <strong>EuiAccordion</strong> will appear here. | ||
</EuiPanel> | ||
</EuiAccordion> | ||
); | ||
}; |
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.