How to use the @primer/octicons-react.getIconByName function in @primer/octicons-react

To help you get started, we’ve selected a few @primer/octicons-react 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 bdougie / open-sauced / src / components / RepoListItem.js View on Github external
function RepoListItem({goal, stars}) {
  return (
    
      
        
          
          
            <p>{goal.title}</p>
            {stars &amp;&amp; (
              
                
                <p>{stars}</p>
              
            )}
          
        
      
      
        
          <label>TBD</label>
          <img src="{chevronRight}" alt="pointing right icon">
        
      
    
  );
}
export default RepoListItem;
github bdougie / open-sauced / stories / 2-Card.stories.js View on Github external
export const NoteCard = () =&gt; (
  
    <textarea name="notes" for="" placeholder="{`Type" type="text" value="{&quot;&quot;}" style="{{minHeight:">    &lt;FlexCenter&gt;
      &lt;Button onClick={() =&gt; console.log("clicked")}&gt;
        &lt;Octicon verticalAlign="middle" icon={getIconByName("pencil")} /&gt;
        Edit Notes
      &lt;/Button&gt;
      &lt;Button primary onClick={() =&gt; console.log("clicked")}&gt;
        Delete
      &lt;/Button&gt;
    &lt;/FlexCenter&gt;
  &lt;/Card&gt;
);
</textarea>
github bdougie / open-sauced / src / components / NoteForm.js View on Github external
onChange={_handleNotesChange}
        value={noteContent || ""}
        type="text"
        placeholder={`Type your notes for ${repoName} here...`}
        name="notes"
        aria-label="note input"
      /&gt;
      
        {editing ? (
          <button>
            
            Save Notes
          </button>
        ) : (
          <button>
            
            Edit Notes
          </button>
        )}
        <button>
          {" "}
          Delete
        </button>
      
    
  );
}
github bdougie / open-sauced / src / components / Card.js View on Github external
to={{
              pathname: `/repos/${goal.title}/${goal.number}`,
            }}&gt;
            {goal.title}
          
        
        <p>{goal.description}</p>
        
          {goal.labels &amp;&amp;
            goal.labels.nodes.map(label =&gt; (
              <label>
                {label.name}
              </label>
            ))}
          <span>
            
            {stars}
          </span>
          <span>
            
            {contributors}
          </span>
        
      
    
  );
}
export default Card;
github bdougie / open-sauced / src / components / Card.js View on Github external
<p>{goal.description}</p>
        
          {goal.labels &amp;&amp;
            goal.labels.nodes.map(label =&gt; (
              <label>
                {label.name}
              </label>
            ))}
          <span>
            
            {stars}
          </span>
          <span>
            
            {contributors}
          </span>
        
      
    
  );
}
export default Card;
github eclipse-theia / theia / packages / core / src / browser / status-bar / status-bar.tsx View on Github external
childStrings.forEach((val, key) =&gt; {
            if (!(typeof val === 'string') &amp;&amp; LabelIcon.is(val)) {
                const octicon = getIconByName(val.name);
                if (octicon) {
                    children.push(<span></span>);
                } else {
                    children.push(<span></span>);
                }
            } else {
                children.push(<span>{val}</span>);
            }
        });
        const elementInnerDiv = {children};

@primer/octicons-react

A scalable set of icons handcrafted with <3 by GitHub.

MIT
Latest version published 22 days ago

Package Health Score

89 / 100
Full package analysis