10 examples of 'materialcommunityicons react native' in JavaScript

Every line of 'materialcommunityicons react native' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
13export function MaterialIcon (props: *): * {
14 let {
15 wrap,
16 className,
17 ...other
18 } = props;
19 wrap = wrap || 'i';
20 className = classNames(
21 styles.icon,
22 className
23 );
24 return React.createElement(wrap, {
25 className,
26 ...other
27 });
28}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

42function Icon(props) {
43 var icon = props.icon,
44 rest = babelHelpers.objectWithoutProperties(props, ['icon']);
45
46
47 return _react2['default'].createElement('i', babelHelpers['extends']({}, (0, _omit2['default'])(rest, ['states', 'variants']), {
48 'data-icon': icon,
49 className: cx(props).build() }));
50}
28function Icon(props) {
29 return _react2.default.createElement(
30 StyledIcon,
31 { className: props.className, size: props.size },
32 _react2.default.createElement('use', { xlinkHref: '#' + (props.symbol || 'placeholder') })
33 );
34}
62protected materialDom(props) {
63 return (
64 <a className="material-icons" {...props}>
65 {props.children || 'menu'}
66 </a>
67 );
68}
80export default function createStyledIcon(Component, displayName) {
81 const StyledComponent = styled(Component)(
82 props => `
83 * {
84 fill: ${getColor(props.color, props.theme)};
85 }
86 ${getSizeStyle(props.size)}
87 `
88 );
89 StyledComponent.displayName = displayName;
90 StyledComponent.propTypes = iconPropTypes;
91 return StyledComponent;
92}
15export function Icon (props: IconProps) {
16 const { type, size = 14, className: cn, style: s } = props
17 const className = classnames('clash-iconfont', `icon-${type}`, cn)
18 const style: React.CSSProperties = { fontSize: size, ...s }
19 const iconProps = { ...props, className, style }
20
21 return <i {...iconProps} />
22}
48function Icon({
49 title,
50 onMouseDown,
51 onDoubleClick,
52 icon,
53 className,
54 id,
55 component,
56 measure,
57}) {
58 const ref = useRef(null);
59 function _onMouseDown() {
60 onMouseDown(id);
61 }
62 function _onDoubleClick() {
63 onDoubleClick(component);
64 }
65 useEffect(() => {
66 const target = ref.current;
67 if (!target) return;
68 const { left, top, width, height } = ref.current.getBoundingClientRect();
69 const posX = left + window.scrollX;
70 const posY = top + window.scrollY;
71 measure({ id, x: posX, y: posY, w: width, h: height });
72 }, [id, measure]);
73 return (
74 <div
75 className={className}
76 onMouseDown={_onMouseDown}
77 onDoubleClick={_onDoubleClick}
78 ref={ref}
79 >
80 <div className={`${className}__img__container`}>
81 <img src={icon} alt={title} className={`${className}__img`} />
82 </div>
83 <div className={`${className}__text__container`}>
84 <div className={`${className}__text`}>{title}</div>
85 </div>
86 </div>
87 );
88}
23var icon = function icon(_ref) {
24 var color = _ref.color,
25 width = _ref.width,
26 height = _ref.height,
27 size = _ref.size,
28 rest = _objectWithoutProperties(_ref, ['color', 'width', 'height', 'size']);
29
30 return _react2.default.createElement(
31 'svg',
32 _extends({ fill: color, width: size || width, height: size || height }, rest, { viewBox: '0 0 1792 1792', xmlns: 'http://www.w3.org/2000/svg' }),
33 _ref2
34 );
35};
23var icon = function icon(_ref) {
24 var color = _ref.color,
25 width = _ref.width,
26 height = _ref.height,
27 size = _ref.size,
28 rest = _objectWithoutProperties(_ref, ['color', 'width', 'height', 'size']);
29
30 return _react2.default.createElement(
31 'svg',
32 _extends({ fill: color, width: size || width, height: size || height }, rest, { viewBox: '0 0 2048 1792', xmlns: 'http://www.w3.org/2000/svg' }),
33 _ref2
34 );
35};
97renderIcon: function renderIcon(icon) {
98 var iconClassname = (0, _classnames2['default'])('FormSelect__arrows', {
99 'FormSelect__arrows--disabled': this.props.disabled
100 });
101
102 return _reactAddons2['default'].createElement('span', { dangerouslySetInnerHTML: { __html: icon }, className: iconClassname });
103},

Related snippets