Every line of 'react icons github' 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.
4 export default function injectIconsGithub(target) { 5 chrome.storage.sync.get('isColor', ({ isColor }) => { 6 const $items = $('.js-navigation-item', target); 7 $items.each((index, item) => { 8 const $item = $(item); 9 const isFile = $item.find('.octicon-file').length > 0 10 const isSvg = $item.find('.octicon-file-text').length > 0; 11 const name = $item.find('.js-navigation-open').text(); 12 const $icon = $item.find('.icon'); 13 14 if (isFile || isSvg) { 15 let className; 16 if (isColor) { 17 className = fileIcons.getClassWithColor(name) || DEFAULT_ICON; 18 } else { 19 className = fileIcons.getClass(name) || DEFAULT_ICON; 20 } 21 $icon.addClass(`gfi ${className}`); 22 23 if (isSvg) { 24 $item.find('svg').remove() 25 } 26 } 27 }); 28 }); 29 }
95 export function createIcon(i: IconDefinition): React.FunctionComponent { 96 return function I() { 97 return 98 } 99 }
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 }
34 getIcon() { 35 const { icon, classes } = this.props 36 if (icon) { 37 const iconProps = icon.props.className ? classNames(classes.icon, icon.props.className) : classNames(classes.icon) 38 const newIcon = React.cloneElement(icon, {...icon.props, className: iconProps}) 39 return newIcon 40 } 41 }
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 }
8 render () { 9 const { bufferRepos: repos, classes, className } = this.props 10 const link = oauthUrl({ repos }) 11 return ( 12 13 {GitHubIcon()} GitHub Sign In 14 15 ) 16 }
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 }
33 get icon() { 34 if (this.isFork) { 35 return 'forkTemplate.png'; 36 } else { 37 return 'repoTemplate.png'; 38 } 39 }
28 function Icon({ icon, className }) { 29 if (iconMap.has(icon)) { 30 return ( 31 32 ); 33 } 34 if (isValidElement(icon)) { 35 return <span>{icon}</span>; 36 } 37 38 return null; 39 }
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 },