All files / components/Icon/InfoLightIcon InfoLightIcon.jsx

100% Statements 4/4
100% Branches 2/2
100% Functions 0/0
100% Lines 4/4
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            134x               134x             8x   8x                                            
import _ from 'lodash';
import React from 'react';
import Icon from '../Icon';
import { lucidClassNames } from '../../../util/style-helpers';
import { createClass } from '../../../util/component-types';
 
const cx = lucidClassNames.bind('&-InfoLightIcon');
 
/**
 *
 * {"categories": ["visual design", "icons"], "extend": "Icon", "madeFrom": ["Icon"]}
 *
 * A light info icon.
 */
const InfoLightIcon = createClass({
	displayName: 'InfoLightIcon',
	propTypes: {
		...Icon.propTypes,
	},
 
	render() {
		const { className, isDisabled, isClickable, ...passThroughs } = this.props;
 
		return (
			<Icon
				{...passThroughs}
				{..._.pick(passThroughs, _.keys(Icon.propTypes))}
				isClickable={isClickable}
				isDisabled={isDisabled}
				className={cx('&', className, isClickable && '&-is-clickable')}
			>
				<path
					className={cx('&-background')}
					d="M8 15c-3.86 0-7-3.14-7-7s3.14-7 7-7 7 3.14 7 7-3.14 7-7 7z"
				/>
				<path
					className={cx('&-mark', { '&-mark-is-disabled': isDisabled })}
					d="M8 0C3.582 0 0 3.582 0 8s3.582 8 8 8 8-3.582 8-8-3.582-8-8-8zm0 15c-3.86 0-7-3.14-7-7s3.14-7 7-7 7 3.14 7 7-3.14 7-7 7zM7 3h2v2H7V3zm0 3h2v7H7V6z"
				/>
			</Icon>
		);
	},
});
 
export default InfoLightIcon;