{"size": 537, "ext": "js", "max_stars_repo_path": "client/src/components/common/Form/AuthToken/AuthToken.js", "max_stars_repo_name": "charleslewisdev/react-node-heroku-starter", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/src/components/common/Form/AuthToken/AuthToken.js", "max_issues_repo_name": "charleslewisdev/react-node-heroku-starter", "max_issues_repo_issues_event_min_datetime": "2022-01-22T13:15:29.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-22T13:15:29.000Z", "max_forks_repo_path": "client/src/components/common/Form/AuthToken/AuthToken.js", "max_forks_repo_name": "charleslewisdev/react-lab", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 22.375, "max_line_length": 59, "alphanum_fraction": 0.6275605214}
import React from 'react';
import {TextField} from '@material-ui/core';
import {CopyToClipboardButton} from 'components/common';
import useStyles from './styles';

const AuthToken = ({label, value, ...additionalProps}) => {
  const styles = useStyles();

  return (
    <div className={styles.AuthToken}>
      <TextField
        disabled={true}
        fullWidth
        label={label}
        value={value}
        {...additionalProps}
      />
      <CopyToClipboardButton text={value} />
    </div>
  );
};

export default AuthToken;
