import React, { useState } from "react"; import filter from "./filter.svg"; import plus from "./plus.svg"; import more from "./more2.svg"; export function EditButtons({ buttons }) { const [selectedButton, setSelectedButton] = useState(null); return (
{buttons.map((button, index) => (
setSelectedButton(selectedButton === button ? null : button) } >

{button.title}

))}
); } EditButtons.defaultProps = { buttons: [ { logo: plus, width: "w-3", height: "h-3", title: "ثبت جدید", backgroundColor: "#65A9FF", border: "border-b-4", borderColor: "#3686EC", padding: "4px 7px", components: "d", buttonSubItems: [], }, { logo: filter, width: "w-5", height: "h-5", title: null, backgroundColor: "#F3F8FF", border: null, borderColor: null, components: "a", buttonSubItems: [], }, { logo: more, width: "w-5", height: "h-5", title: null, textColor: null, backgroundColor: "#F3F8FF", border: null, borderColor: null, components: "a", buttonSubItems: [ { title: "دراپ داون 1", }, ], }, ], }; // { // logo: settings, // width: "w-5", // height: "h-5", // title: null, // textColor: null, // backgroundColor: "#F3F8FF", // components: "b", // },