eui icon indicating copy to clipboard operation
eui copied to clipboard

[EuiCopy] Add `tooltipProps` prop

Open weronikaolejniczak opened this issue 9 months ago • 1 comments

Description

The purpose of this task is to add a tooltipProps prop to the EuiCopy component instead of passing tooltip props flat to the component type. This helps to to distinguish tooltip props from the copy functionality props.

It's consistent with other components that consume props to pass to children (e.g. for EuiSuperUpdateButton (code) or EuiButtonGroupButton (code))

[!IMPORTANT] Updating the component API will be a breaking change and requires updating implementation usages.

Acceptance criteria

  • [x] added prop tooltipProps to EuiCopy and updated it's prop type definition
  • [x] updated usages/examples across EUI docs
  • [x] tested/verified the API change for usages in Kibana (pre-prepared changes for release upgrade)
  • [x] Since we need to update tests for this anyway, it is probably worth migrating to do as RTL at the same time, assuming it's a small test file.

Rollout consideration

Note on impact / scope of rollout: If we make it a breaking change, there is usage in Kibana we would need to update, but it should be limited and we can handle that ourselves as part of the upgrade.

weronikaolejniczak avatar Mar 03 '25 10:03 weronikaolejniczak