You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
994 B
33 lines
994 B
import arrowIcon from "./arrow-icon.svg"; |
|
import more from "./more2.svg"; |
|
import edit from "./edit.svg"; |
|
|
|
import { useState } from "react"; |
|
|
|
export function Buttons({ row }) { |
|
const [activeDetails, setActiveDetails] = useState(null); |
|
return ( |
|
<div |
|
className="flex flex-row items-center justify-end" |
|
{...row.getToggleRowExpandedProps()} |
|
> |
|
<button |
|
className="mx-1 flex flex-row items-center justify-around p-2 rounded border border-gray-300 " |
|
onClick={() => setActiveDetails(!activeDetails)} |
|
> |
|
جزیات |
|
<img |
|
src={arrowIcon} |
|
alt="" |
|
className={`mx-1 w-3 cursor-pointer mr-2 ${ |
|
activeDetails ? "rotate-60" : "rotate-90" |
|
}`} |
|
/> |
|
</button> |
|
<div className="mx-1 p-2 rounded border border-gray-300 cursor-pointer "> |
|
<img src={edit} alt="" className="w-4" /> |
|
</div> |
|
<img src={more} alt="" className="w-5 cursor-pointer " /> |
|
</div> |
|
); |
|
}
|
|
|