BasicSettings.tsx 879 B

12345678910111213141516171819202122232425262728293031323334
  1. import React, { SFC } from 'react';
  2. import { Label } from 'app/core/components/Label/Label';
  3. export interface Props {
  4. dataSourceName: string;
  5. onChange: (name: string) => void;
  6. }
  7. const BasicSettings: SFC<Props> = ({ dataSourceName, onChange }) => {
  8. return (
  9. <div className="gf-form-group">
  10. <div className="gf-form max-width-30">
  11. <Label
  12. tooltip={
  13. 'The name is used when you select the data source in panels. The Default data source is' +
  14. 'preselected in new panels.'
  15. }
  16. >
  17. Name
  18. </Label>
  19. <input
  20. className="gf-form-input max-width-23"
  21. type="text"
  22. value={dataSourceName}
  23. placeholder="Name"
  24. onChange={event => onChange(event.target.value)}
  25. required
  26. />
  27. </div>
  28. </div>
  29. );
  30. };
  31. export default BasicSettings;