return (
    <form onSubmit={formSubmitHandler}>
        <div className="form-control">
            <label
                style={{
                    color: !isValid ? 'red' : 'black',
                }}
            >
                Course Goal
            </label>
            <input
                style={{
                    boderColor: !isValid ? 'red' : '#ccc',
                    background: !isValid ? 'salmon' : 'transparent',
                }}
                type="text"
                onChange={goalInputChangeHandler}
            />
        </div>
        <Button type="submit">Add Goal</Button>
    </form>
);
return (
    <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>
);

styled components

import styled from 'styled-components';

const Button = styled.button``; // styled.button() 과 동일