Commit 864414b4 authored by Kim, Subin's avatar Kim, Subin
Browse files

BtnGroup disabled props 추가

parent 2fe326b4
import { useHistory } from "react-router-dom"; import { useHistory } from "react-router-dom";
import styles from "./buttons.module.scss"; import styles from "./buttons.module.scss";
const BtnGroup = () => { const BtnGroup = ({ disabled }) => {
const history = useHistory(); const history = useHistory();
return ( return (
<div className="d-flex justify-content-around my-4"> <div className="d-flex justify-content-around my-4">
<button className="btn btn-white col-5 shadow-none border-dark" type="button" onClick={() => history.goBack()}>취소</button> <button className="btn btn-white col-5 shadow-none border-dark" type="button" onClick={() => history.goBack()}>취소</button>
<button className={`btn btn-crimson col-5 ${styles.disabledBtn}`} type="submit" disabled>등록</button> <button className={`btn btn-crimson col-5 ${styles.disabledBtn}`} type="submit" disabled={disabled}>등록</button>
</div> </div>
) )
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment