You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-wallet/src/js/components/common/Icon.js

42 lines
775 B

import React from 'react';
import PropTypes from 'prop-types';
const Icon = (props) => {
const styles = {
svg: {
display: 'inline-block',
verticalAlign: 'middle',
},
path: {
fill: props.color,
},
};
return (
<svg
style={styles.svg}
width={`${props.size}`}
height={`${props.size}`}
viewBox="0 0 16 16"
>
<path
style={styles.path}
d={props.icon}
/>
</svg>
);
};
Icon.propTypes = {
icon: PropTypes.string.isRequired,
size: PropTypes.number,
color: PropTypes.string,
};
Icon.defaultProps = {
size: 30,
color: 'black',
};
export default Icon;