AssignEditor.md 581 Bytes
Newer Older
Alf Eaton's avatar
Alf Eaton committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
A drop-down menu for assigning an editor to a project.

```js
const project = {
  id: faker.random.uuid(),
};

const team = {
  members: []
};

const options = [
  {
    value: faker.random.uuid(),
    label: faker.internet.userName(),
  },
  {
    value: faker.random.uuid(),
    label: faker.internet.userName(),
  },
  {
    value: faker.random.uuid(),
    label: faker.internet.userName(),
  }
];

<AssignEditor 
  project={project}
  team={team}
  teamName="Senior Editor"
  teamTypeName="seniorEditor"
  options={options}
  addUserToTeam={value => console.log(value)}
/>
```