ShareCourse Outline

Build an App with React and Ampersand

4-6 Fleshing out the label component

next:Deleting a label
previous:Adding Octicons

topics

Copy/paste content

Form version:

<form className='label'>
  <span className='label-color avatar avatar-small avatar-rounded'>&nbsp;</span>
  <input name='name'/>
  <input name='color'/>
  <button type='submit' className='button button-small'>Save</button>
  <button type='button' className='button button-small button-unstyled'>cancel</button>
</form>

View version:

<div className='label'>
  <span className='label-color'>&nbsp;</span>
  <span></span>
  <span className='octicon octicon-pencil'></span>
  <span className='octicon octicon-x'></span>
</div>

notes


Code Viewer