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.
13 export 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 }
42 function 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 }
28 function 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 }
62 protected materialDom(props) { 63 return ( 64 <a> 65 {props.children || 'menu'} 66 </a> 67 ); 68 }
80 export 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 }
15 export 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> 22 }</i>
48 function 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 <div> 76 77 </div> 78 <div> 79 <div>{title}</div> 80 </div> 81 </div> 82 ); 83 }
23 var 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 };
23 var 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 };
97 renderIcon: 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 },