{"size": 1847, "ext": "js", "max_stars_repo_path": "app/shared/components/Global/Modal/Settings/Blockchains/Form.js", "max_stars_repo_name": "andr3ytp/Sqrl", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/shared/components/Global/Modal/Settings/Blockchains/Form.js", "max_issues_repo_name": "andr3ytp/Sqrl", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/shared/components/Global/Modal/Settings/Blockchains/Form.js", "max_forks_repo_name": "andr3ytp/Sqrl", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.768115942, "max_line_length": 111, "alphanum_fraction": 0.5831077423}
// @flow
import React, { Component } from 'react';
import { translate } from 'react-i18next';
import { Button, Container, Form, Input } from 'semantic-ui-react';

class GlobalModalSettingsBlockchainsForm extends Component<Props> {
  render() {
    const {
      onChange,
      onSubmit,
      ref,
      t,
      values
    } = this.props;
    const {
      blockchain,
      prefix,
      node
    } = values;

    return (
      <Form
        onSubmit={onSubmit}
        ref={ref}
      >
        <Form.Field
          autoFocus
          control={Input}
          fluid
          label={t('global_modal_settings_blockchain_form_blockchain_label')}
          name="blockchain"
          onChange={onChange}
          placeholder={t('global_modal_settings_blockchain_form_blockchain_placeholder', {tokenSymbol:prefix})}
          type="text"
          value={blockchain}
        />
        <Form.Field
          control={Input}
          fluid
          label={t('global_modal_settings_blockchain_form_prefix_label')}
          name="prefix"
          onChange={onChange}
          placeholder={t('global_modal_settings_blockchain_form_prefix_placeholder', {tokenSymbol:prefix})}
          type="text"
          value={prefix}
        />
        <Form.Field
          control={Input}
          fluid
          label={t('global_modal_settings_blockchain_form_node_label')}
          name="node"
          onChange={onChange}
          placeholder={t('global_modal_settings_blockchain_form_node_placeholder')}
          type="text"
          value={node}
        />
        <Container textAlign="center">
          <Button
            color="green"
            content={t('global_modal_settings_blockchain_add')}
          />
        </Container>
      </Form>
    );
  }
}

export default translate('global')(GlobalModalSettingsBlockchainsForm);
