2019-03-25 09:53:05 -05:00
|
|
|
import React, { ChangeEvent, FC } from 'react';
|
|
|
|
import { Input } from '@grafana/ui';
|
2018-10-25 09:56:49 -05:00
|
|
|
|
2018-10-29 07:46:12 -05:00
|
|
|
export interface Props {
|
2018-10-25 09:56:49 -05:00
|
|
|
orgName: string;
|
|
|
|
onSubmit: () => void;
|
|
|
|
onOrgNameChange: (orgName: string) => void;
|
|
|
|
}
|
|
|
|
|
2019-01-17 02:27:43 -06:00
|
|
|
const OrgProfile: FC<Props> = ({ onSubmit, onOrgNameChange, orgName }) => {
|
2018-10-25 09:56:49 -05:00
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<h3 className="page-sub-heading">Organization profile</h3>
|
2018-10-26 07:51:33 -05:00
|
|
|
<form
|
|
|
|
name="orgForm"
|
|
|
|
className="gf-form-group"
|
|
|
|
onSubmit={event => {
|
|
|
|
event.preventDefault();
|
|
|
|
onSubmit();
|
|
|
|
}}
|
|
|
|
>
|
2018-10-25 09:56:49 -05:00
|
|
|
<div className="gf-form-inline">
|
|
|
|
<div className="gf-form max-width-28">
|
|
|
|
<span className="gf-form-label">Organization name</span>
|
2019-03-25 09:53:05 -05:00
|
|
|
<Input
|
2018-10-25 09:56:49 -05:00
|
|
|
className="gf-form-input"
|
|
|
|
type="text"
|
2019-03-25 09:53:05 -05:00
|
|
|
onChange={(event: ChangeEvent<HTMLInputElement>) => onOrgNameChange(event.target.value)}
|
2018-10-25 09:56:49 -05:00
|
|
|
value={orgName}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="gf-form-button-row">
|
2019-02-05 05:05:02 -06:00
|
|
|
<button type="submit" className="btn btn-primary">
|
2018-10-25 09:56:49 -05:00
|
|
|
Save
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default OrgProfile;
|