How to use @hig/icons - 8 common examples

To help you get started, we’ve selected a few @hig/icons examples, based on popular ways it is used in public projects.

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

github Autodesk / hig / packages / side-nav / src / Module / presenters / TitlePresenter.js View on Github external
className={css(styles.wrapper)}
              onClick={handleClick}
              onKeyDown={handleKeyDown}
              role={role}
              tabIndex={tabIndex}
              target={wrapperTarget}
            >
              <div>{icon}</div>
              <div>{title}</div>
              {isExternalLink &amp;&amp; (
                <div>
                  
                </div>
              )}
            
          );
        }}
github Autodesk / hig / packages / side-nav / src / presenters / ExternalLinkIcon.js View on Github external
render() {
    if (this.props.size === iconSizes.PX_24) {
      return ;
    }

    return ;
  }
}
github Autodesk / hig / packages / side-nav / src / Link / Link.js View on Github external
{({ resolvedRoles, metadata }) =&gt; {
          const styles = stylesheet(this.props, resolvedRoles);
          const size =
            metadata.densityId === "medium-density"
              ? iconSizes.PX_24
              : iconSizes.PX_16;
          return (
            
              
                {title}
              
              {this._renderExternalLinkIcon(styles, size)}
            
          );
github Autodesk / hig / packages / side-nav / src / Submodule / Submodule.js View on Github external
onMouseOver={onMouseOver}
            role={role}
            tabIndex="0"
            target={wrapperTarget}
          &gt;
            {title}
            {isExternalLink ? (
              <div>
                
              </div>
            ) : null}
          
        )}
github Autodesk / hig / packages / side-nav / src / presenters / ExternalLinkIcon.js View on Github external
import React, { Component } from "react";
import PropTypes from "prop-types";
import { ExternalLink16, ExternalLink24, sizes as iconSizes } from "@hig/icons";

export default class ExternalLinkIcon extends Component {
  static propTypes = {
    /** Size of the icon */
    size: PropTypes.oneOf(Object.values(iconSizes)),
    /** Color of the icon */
    color: PropTypes.string
  };

  static defaultProps = {
    size: iconSizes.PX_24
  };

  render() {
    if (this.props.size === iconSizes.PX_24) {
      return ;
    }

    return ;
  }
}
github Autodesk / hig / packages / side-nav / src / Submodule / Submodule.js View on Github external
role={role}
            tabIndex="0"
            target={wrapperTarget}
          &gt;
            {title}
            {isExternalLink ? (
              <div>
                
              </div>
            ) : null}
          
        )}
github Autodesk / hig / packages / side-nav / src / Module / presenters / TitlePresenter.js View on Github external
onClick={handleClick}
              onKeyDown={handleKeyDown}
              role={role}
              tabIndex={tabIndex}
              target={wrapperTarget}
            &gt;
              <div>{icon}</div>
              <div>{title}</div>
              {isExternalLink &amp;&amp; (
                <div>
                  
                </div>
              )}
            
          );
        }}
github Autodesk / hig / packages / side-nav / src / Link / Link.js View on Github external
{({ resolvedRoles, metadata }) =&gt; {
          const styles = stylesheet(this.props, resolvedRoles);
          const size =
            metadata.densityId === "medium-density"
              ? iconSizes.PX_24
              : iconSizes.PX_16;
          return (
            
              
                {title}
              
              {this._renderExternalLinkIcon(styles, size)}
            
          );
        }}

@hig/icons

HIG icon assets

Apache-2.0
Latest version published 2 years ago

Package Health Score

54 / 100
Full package analysis