create dir button input style

This commit is contained in:
Niklas 2021-08-24 23:57:28 +02:00
parent 98f198c74a
commit 2fafdf8983

View File

@ -20,7 +20,7 @@ const CreateDirButton: React.FC<Props> = (props) => {
},[show]) },[show])
return ( return (
<div> <div className="flex">
<button <button
onClick={()=>{ onClick={()=>{
setShow(!show) setShow(!show)
@ -29,7 +29,7 @@ const CreateDirButton: React.FC<Props> = (props) => {
> >
<MdCreateNewFolder size="40"/> <MdCreateNewFolder size="40"/>
</button> </button>
<div className={`${!show?"hidden":""} flex`}> <div className={`my-auto ${show?"w-44":"w-0"} overflow-hidden transition-all`} >
<form <form
onSubmit={(e)=>{ onSubmit={(e)=>{
e.preventDefault() e.preventDefault()
@ -38,6 +38,7 @@ const CreateDirButton: React.FC<Props> = (props) => {
setShow(false) setShow(false)
}}> }}>
<input <input
className="bg-transparent dark:text-gray-300 outline-none mx-1 border-b"
type="text" type="text"
onChange={(e)=>setName(e.target.value)} onChange={(e)=>setName(e.target.value)}
value={name} value={name}