mirror of
https://github.com/ansible/awx.git
synced 2026-03-18 17:37:30 -02:30
Explicitly pass id through to the action item
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { func } from 'prop-types';
|
import { func, string } from 'prop-types';
|
||||||
|
|
||||||
const TooltipItem = styled.div`
|
const TooltipItem = styled.div`
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -24,17 +24,17 @@ const TooltipItem = styled.div`
|
|||||||
|
|
||||||
function WorkflowActionTooltipItem({
|
function WorkflowActionTooltipItem({
|
||||||
children,
|
children,
|
||||||
|
id,
|
||||||
onClick,
|
onClick,
|
||||||
onMouseEnter,
|
onMouseEnter,
|
||||||
onMouseLeave,
|
onMouseLeave,
|
||||||
...rest
|
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<TooltipItem
|
<TooltipItem
|
||||||
|
id={id}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
onMouseEnter={onMouseEnter}
|
onMouseEnter={onMouseEnter}
|
||||||
onMouseLeave={onMouseLeave}
|
onMouseLeave={onMouseLeave}
|
||||||
{...rest}
|
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</TooltipItem>
|
</TooltipItem>
|
||||||
@@ -42,6 +42,7 @@ function WorkflowActionTooltipItem({
|
|||||||
}
|
}
|
||||||
|
|
||||||
WorkflowActionTooltipItem.propTypes = {
|
WorkflowActionTooltipItem.propTypes = {
|
||||||
|
id: string.isRequired,
|
||||||
onClick: func,
|
onClick: func,
|
||||||
onMouseEnter: func,
|
onMouseEnter: func,
|
||||||
onMouseLeave: func,
|
onMouseLeave: func,
|
||||||
|
|||||||
Reference in New Issue
Block a user