parent
2a74360a2d
commit
54319326bb
7 changed files with 7775 additions and 7898 deletions
@ -1,25 +1,31 @@ |
||||
import arrowIcon from './arrow-icon.svg'; |
||||
import more from './more.svg'; |
||||
import edit from './edit.svg'; |
||||
import arrowIcon from "./arrow-icon.svg"; |
||||
import more from "./more.svg"; |
||||
import edit from "./edit.svg"; |
||||
|
||||
import { useState } from 'react'; |
||||
import { useState } from "react"; |
||||
|
||||
|
||||
|
||||
export function Buttons({ }) { |
||||
export function Buttons({ row }) { |
||||
const [activeDetails, setActiveDetails] = useState(null); |
||||
return ( |
||||
<div className="flex flex-row items-center justify-end"> |
||||
<button
|
||||
className="flex flex-row items-center justify-around p-2 rounded border border-gray-300 mx-1" |
||||
onClick={ () => setActiveDetails(!activeDetails) }> |
||||
جزیات |
||||
<img src={arrowIcon} alt="" className={`w-3 cursor-pointer mr-2 ${activeDetails ? "rotate-60" : "rotate-90"}`} /> |
||||
</button> |
||||
<div className="p-2 rounded border border-gray-300 cursor-pointer mx-1"> |
||||
<img src={edit} alt="" className="w-4" /> |
||||
</div> |
||||
<img src={more} alt="" className="w-5 cursor-pointer rotate-90 mx-1" /> |
||||
return ( |
||||
<div className="flex flex-row items-center justify-end"> |
||||
<button |
||||
className="flex flex-row items-center justify-around p-2 rounded border border-gray-300 mx-1" |
||||
onClick={() => setActiveDetails(!activeDetails)} |
||||
{...row.getToggleRowExpandedProps()} |
||||
> |
||||
جزیات |
||||
<img |
||||
src={arrowIcon} |
||||
alt="" |
||||
className={`w-3 cursor-pointer mr-2 ${ |
||||
activeDetails ? "rotate-60" : "rotate-90" |
||||
}`}
|
||||
/> |
||||
</button> |
||||
<div className="p-2 rounded border border-gray-300 cursor-pointer mx-1"> |
||||
<img src={edit} alt="" className="w-4" /> |
||||
</div> |
||||
); |
||||
} |
||||
<img src={more} alt="" className="w-5 cursor-pointer rotate-90 mx-1" /> |
||||
</div> |
||||
); |
||||
} |
||||
|
Loading…
Reference in new issue