{"size": 676, "ext": "js", "max_stars_repo_path": "src/components/ClientSecret/index.js", "max_stars_repo_name": "DawieBotes/xero-oauth2-tokens-site", "max_stars_repo_stars_event_min_datetime": "2020-05-27T09:34:58.000Z", "max_stars_repo_stars_event_max_datetime": "2020-05-27T09:34:58.000Z", "max_issues_repo_path": "src/components/ClientSecret/index.js", "max_issues_repo_name": "DawieBotes/xero-oauth2-tokens-site", "max_issues_repo_issues_event_min_datetime": "2020-02-10T09:05:30.000Z", "max_issues_repo_issues_event_max_datetime": "2020-02-10T09:05:30.000Z", "max_forks_repo_path": "src/components/ClientSecret/index.js", "max_forks_repo_name": "DawieBotes/xero-oauth2-tokens-site", "max_forks_repo_forks_event_min_datetime": "2020-02-07T12:44:45.000Z", "max_forks_repo_forks_event_max_datetime": "2020-02-18T00:13:05.000Z"}
{"max_stars_count": 1, "max_issues_count": 1, "max_forks_count": 2, "avg_line_length": 33.8, "max_line_length": 170, "alphanum_fraction": 0.6153846154}
import React from 'react';

function ClientSecret({clientSecret, setClientSecret, getTokens}){

    const onSubmit = event => {
        getTokens();
        event.preventDefault();
    }

    return (
        <form onSubmit={onSubmit}>
                <h3>Step 3: Provide your client secret and get access tokens</h3>
                <label>Client secret: </label>
                <input style={{width:"20em"}} name="clientSecret" type="password" value={clientSecret} onChange={(event)=>setClientSecret(event.target.value)} required />
                <button style={{margin: "1em"}} type="submit">Get access tokens</button>
      </form>
    )
}

export default ClientSecret;