{"size": 753, "ext": "js", "max_stars_repo_path": "client/coral-admin/src/routes/Configure/components/Domainlist.js", "max_stars_repo_name": "richardvenneman/talk", "max_stars_repo_stars_event_min_datetime": "2020-06-12T11:04:58.000Z", "max_stars_repo_stars_event_max_datetime": "2021-01-09T04:56:50.000Z", "max_issues_repo_path": "client/coral-admin/src/routes/Configure/components/Domainlist.js", "max_issues_repo_name": "richardvenneman/talk", "max_issues_repo_issues_event_min_datetime": "2018-01-12T11:15:25.000Z", "max_issues_repo_issues_event_max_datetime": "2018-02-13T12:38:04.000Z", "max_forks_repo_path": "client/coral-admin/src/routes/Configure/components/Domainlist.js", "max_forks_repo_name": "richardvenneman/talk", "max_forks_repo_forks_event_min_datetime": "2017-11-22T03:01:28.000Z", "max_forks_repo_forks_event_max_datetime": "2017-11-22T03:01:28.000Z"}
{"max_stars_count": 2, "max_issues_count": 2, "max_forks_count": 1, "avg_line_length": 28.9615384615, "max_line_length": 69, "alphanum_fraction": 0.7038512616}
import React from 'react';
import PropTypes from 'prop-types';
import TagsInput from 'coral-admin/src/components/TagsInput';
import t from 'coral-framework/services/i18n';
import ConfigureCard from 'coral-framework/components/ConfigureCard';

const Domainlist = ({ domains, onChangeDomainlist }) => {
  return (
    <ConfigureCard title={t('configure.domain_list_title')}>
      <p>{t('configure.domain_list_text')}</p>
      <TagsInput
        value={domains}
        inputProps={{ placeholder: 'URL' }}
        onChange={tags => onChangeDomainlist('whitelist', tags)}
      />
    </ConfigureCard>
  );
};

Domainlist.propTypes = {
  domains: PropTypes.array.isRequired,
  onChangeDomainlist: PropTypes.func.isRequired,
};

export default Domainlist;
