summaryrefslogtreecommitdiff
path: root/source/github-widgets/mergeability-row.tsx
blob: a1f6c85fe2aae03a29899f8ca4e70c0ee63ea0c1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import React from 'dom-chef';

type MergeabilityRowProps = {
	action?: JSX.Element;
	icon: JSX.Element;
	iconClass?: string;
	heading: JSX.Element | string;
	meta?: JSX.Element | string;
	className?: string;
};

export default function createMergeabilityRow({
	className = '',
	action,
	icon,
	iconClass = '',
	heading,
	meta,
}: MergeabilityRowProps): JSX.Element {
	return (
		<div className={`branch-action-item ${className}`}>
			<div
				className="branch-action-btn float-right js-immediate-updates js-needs-timeline-marker-header"
			>
				{action}
			</div>
			<div
				className={`branch-action-item-icon completeness-indicator ${iconClass}`}
			>
				{icon}
			</div>
			<h3 className="h4 status-heading">
				{heading}
			</h3>
			<span className="status-meta">
				{meta}
			</span>
		</div>
	);
}