(props: {
target: ImpactTarget;
onOpen: (target: ImpactTarget) => void;
children: JSX.Element | string;
})
| 107 | } |
| 108 | |
| 109 | function RowButton(props: { |
| 110 | target: ImpactTarget; |
| 111 | onOpen: (target: ImpactTarget) => void; |
| 112 | children: JSX.Element | string; |
| 113 | }): JSX.Element { |
| 114 | const openable = props.target.filePath !== undefined && props.target.filePath.length > 0; |
| 115 | return ( |
| 116 | <Hint |
| 117 | name="impact-open" |
| 118 | text={ |
| 119 | openable |
| 120 | ? messages.impact.openRow(props.target.name) |
| 121 | : messages.impact.rowNotOpenable |
| 122 | } |
| 123 | > |
| 124 | <button |
| 125 | type="button" |
| 126 | className="atlas-impact-link" |
| 127 | data-testid="atlas-impact-open" |
| 128 | data-name={props.target.name} |
| 129 | data-openable={openable} |
| 130 | disabled={!openable} |
| 131 | onClick={() => props.onOpen(props.target)} |
| 132 | > |
| 133 | {props.children} |
| 134 | </button> |
| 135 | </Hint> |
| 136 | ); |
| 137 | } |
| 138 | |
| 139 | function Section(props: { |
| 140 | name: string; |
nothing calls this directly
no outgoing calls
no test coverage detected