Skip to content

[Flyout System] Add “pass through props” for EuiChildFlyout on EuiFlyout if session=true #9024

@tsullivan

Description

@tsullivan

In the implementation of the new Developer API for flyout system (https://github.com/elastic/kibana-team/issues/1874), a capability became broken, which is to provide the backgroundStyle prop to EuiFlyoutChild. This happened because EuiFlyoutChild is no longer intended to be consumed directly.

Now, we need a way to specify props that should be passed down to the child from the parent. Something like:

        <EuiFlyout
          id={`mainFlyout-${title}`}
          session={true}
          childFlyoutProps={{
            backgroundStyle: 'shaded',
          }}
          size={mainSize}
          maxWidth={mainMaxWidth}
          onClose={handleCloseMainFlyout}
        >

Things to consider

  1. Should we just get rid of the separate EuiFlyoutChildProps interface? Should "main" and "child" flyout components just use the same interface of props? This would result in allowing any flyout to have a shaded background, not just "child" flyouts.
  2. If we decide to keep using the separate EuiFlyoutChildProps interface, then the childFlyoutProps field can only be present if session = true.
  3. If we decide to keep using the separate EuiFlyoutChildProps interface, then the childFlyoutProps field should only be used for props that are specific to child flyouts. In other words, we would only use this for backgroundStyle.

Metadata

Metadata

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions