Changed the code to avoid tech debt with hacky solutions after receiving comments on EUI issue reported about this problem. (#81183) (#81290)

* Changed the code to avoid tech debt with hacky solutions after receiving comments on EUI issue reported about this problem.

* Updated snapshots.
This commit is contained in:
Bohdan Tsymbala 2020-10-21 16:32:20 +02:00 committed by GitHub
parent 9ca0b2baf8
commit 9a4e2af97f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 410 additions and 391 deletions

View file

@ -1,21 +1,15 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`item_details_card ItemDetailsAction should render correctly 1`] = `
<Fragment>
<div>
<EuiButton
className="eui-fullWidth "
color="primary"
contentProps={
Object {
"style": Object {
"height": "auto",
},
}
}
size="s"
>
primary
</EuiButton>
</Fragment>
</div>
`;
exports[`item_details_card ItemDetailsCard should render correctly with actions 1`] = `

View file

@ -80,18 +80,12 @@ export const ItemDetailsPropertySummary = memo<ItemDetailsPropertySummaryProps>(
ItemDetailsPropertySummary.displayName = 'ItemPropertySummary';
export const ItemDetailsAction: FC<PropsForButton<EuiButtonProps>> = memo(
({ children, ...rest }) => (
<>
<EuiButton
contentProps={{
// TODO: remove when https://github.com/elastic/eui/issues/4139 is fixed
style: { height: 'auto' },
}}
{...rest}
>
({ children, className = '', ...rest }) => (
<div>
<EuiButton className={`eui-fullWidth ${className}`} {...rest}>
{children}
</EuiButton>
</>
</div>
)
);

View file

@ -996,22 +996,23 @@ exports[`TrustedAppsList renders correctly when item details expanded 1`] = `
<div
class="euiFlexItem euiFlexItem--flexGrowZero"
>
<button
class="euiButton euiButton--danger euiButton--small"
data-test-subj="trustedAppDeleteButton"
type="button"
>
<span
class="euiButtonContent euiButton__content"
style="height: auto;"
<div>
<button
class="euiButton euiButton--danger euiButton--small eui-fullWidth "
data-test-subj="trustedAppDeleteButton"
type="button"
>
<span
class="euiButton__text"
class="euiButtonContent euiButton__content"
>
Remove
<span
class="euiButton__text"
>
Remove
</span>
</span>
</span>
</button>
</button>
</div>
</div>
</div>
</div>