ajout bouton private/public
This commit is contained in:
parent
660088fb74
commit
b8692d064c
@ -38,6 +38,9 @@ const ModalSetting = ({handleClose, convId}: ModalSettingProps) => {
|
||||
const [selectedUser, setSelectedUser] = useState("");
|
||||
const [newName, setNewName] = useState("");
|
||||
const [newPassword, setNewPassword] = useState("");
|
||||
const [privateConv, setPrivateConv] = useState(false);
|
||||
const dark = () => setPrivateConv(true);
|
||||
const light = () => setPrivateConv(false);
|
||||
|
||||
useEffect(()=> {
|
||||
|
||||
@ -175,7 +178,11 @@ const ModalSetting = ({handleClose, convId}: ModalSettingProps) => {
|
||||
{/* First selection */}
|
||||
<div className="settingFirstPart">
|
||||
<div>
|
||||
<p className="checkbox">Private<input className="check"type="checkbox" value="private" onChange={handleCheckPriv}/></p>
|
||||
<div>
|
||||
<Link to="#" onClick={light} className={ privateConv ? "submit" : "darkSubmit"}>Public</Link>
|
||||
<Link to="#" onClick={dark} className={ privateConv ? "darkSubmit" : "submit"}>Private</Link>
|
||||
</div>
|
||||
{/* <p className="checkbox">Private<input className="check"type="checkbox" value="private" onChange={handleCheckPriv}/></p> */}
|
||||
<p className="checkbox">Password<input type="checkbox" value="password" checked={password} onChange={handleCheckPass}/> </p>
|
||||
|
||||
|
||||
|
||||
@ -204,6 +204,18 @@ p {
|
||||
margin: 1%;
|
||||
}
|
||||
|
||||
.darkSubmit{
|
||||
display: inline-block;
|
||||
color: white;
|
||||
background-color: #282155;
|
||||
border-radius: 10px;
|
||||
padding: 5px;
|
||||
font-size: 1.2rem;
|
||||
text-decoration: none;
|
||||
font-weight:lighter;
|
||||
margin: 1%;
|
||||
}
|
||||
|
||||
.div_submit {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user