Files
grafana/public/app/features/admin/OrgRolePicker.tsx
Tobias Skarhed 69259d62a0 Forms migration: User edit (#23110)
* Forms for UserProfile

* Migrate to new Form styles

* Add remove icon

* Remove unused import

* Update public/app/features/admin/UserOrgs.tsx

* Remove comment

* Remove icon and add text

* Make every ButtonGroup unique - regardless of values

* Remove visual glitch etc.

* Fic failing typecheck
2020-04-01 17:36:08 +02:00

15 lines
426 B
TypeScript

import React, { FC } from 'react';
import { OrgRole } from '@grafana/data';
import { RadioButtonGroup } from '@grafana/ui';
interface Props {
value: OrgRole;
onChange: (role: OrgRole) => void;
}
const options = Object.keys(OrgRole).map(key => ({ label: key, value: key }));
export const OrgRolePicker: FC<Props> = ({ value, onChange }) => (
<RadioButtonGroup options={options} onChange={onChange} value={value} />
);