mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* 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
15 lines
426 B
TypeScript
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} />
|
|
);
|