Skip to content
Snippets Groups Projects
Select Git revision
  • 274835355c86d9981dc288aeba6c81c135b05367
  • main default protected
2 results

unitSelector.js

Blame
  • Forked from SOFT Core / SOFT 260 / React Redux Starter Code
    Source project has a limited visibility.
    unitSelector.js 704 B
    export function UnitSelector(props) {
      const unitSelectorOptions = [
        {
          label: 'Km',
          value: 'km',
        },
        {
          label: 'M',
          value: 'm',
        },
        {
          label: 'Cm',
          value: 'cm',
        },
        {
          label: 'Cm',
          value: 'cm',
        },
        {
          label: 'Ft',
          value: 'ft',
        },
        {
          label: 'In',
          value: 'in',
        },
      ];
    
      return (
        <div>
          <h1>Unit Selector</h1>
          <div className="select-container">
            <select name="units">
              {unitSelectorOptions.map((option) =>
                <option value={option.value}>{option.label}</option>)}
            </select>
          </div>
        </div>
      );
    }