Skip to content

Instantly share code, notes, and snippets.

@aidiary
Last active October 14, 2021 00:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aidiary/7b5806a8d3c7f707304faa4b92f0dae1 to your computer and use it in GitHub Desktop.
Save aidiary/7b5806a8d3c7f707304faa4b92f0dae1 to your computer and use it in GitHub Desktop.
条件付けスタイル
<form onSubmit={formSubmitHandler}>
<div className={`form-control ${!isValid ? 'invalid' : ''}`}>
<label>Course Goal</label>
<input type='text' onChange={goalInputChangeHandler} />
</div>
<Button type='submit'>Add Goal</Button>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment