File size: 1,196 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
41
42
43
44
45
46
47
48
49
50
51
import { Card } from '@automattic/components';
import { ReactNode, FunctionComponent } from 'react';
import CardHeading from 'calypso/components/card-heading';

interface Props {
	children: ReactNode;
	description: ReactNode;
	disclaimer?: ReactNode;
	imageAlt?: string;
	imagePath?: string;
	title: ReactNode;
}

const MarketingToolsFeature: FunctionComponent< Props > = ( {
	children,
	description,
	disclaimer,
	imageAlt,
	imagePath,
	title,
} ) => {
	return (
		<Card className="tools__feature-list-item">
			<div className="tools__feature-list-item-body">
				<div className="tools__feature-list-item-header">
					{ imagePath && (
						<img
							alt={ imageAlt }
							className="tools__feature-list-item-body-image"
							src={ imagePath }
							height={ 32 }
							width={ 32 }
						/>
					) }
					<CardHeading>{ title }</CardHeading>
				</div>

				<div className="tools__feature-list-item-body-text">
					<p>{ description }</p>

					{ disclaimer && <p className="tools__feature-list-item-disclaimer">{ disclaimer }</p> }
				</div>
			</div>

			<div className="tools__feature-list-item-child-row">{ children }</div>
		</Card>
	);
};

export default MarketingToolsFeature;