master
mahdi andalib 3 years ago
parent 15a94a35d1
commit 7745963b25
  1. 6
      src/App.js
  2. 6
      src/components/ReactTable4/Settings.js
  3. 21
      src/components/ReactTable4/ToggleColumns.js

@ -90,17 +90,17 @@ function App() {
{/* <TableDesign1 /> */} {/* <TableDesign1 /> */}
{/* <ReactTable2 /> */} {/* <ReactTable2 /> */}
{/* <ReactTable3 /> */} {/* <ReactTable3 /> */}
{/* <ReactTable4 /> */} <ReactTable4 />
{/* <Digikala /> */} {/* <Digikala /> */}
{/* <DigikalaShop /> */} {/* <DigikalaShop /> */}
<HeaderDesign1 /> {/* <HeaderDesign1 />
<div className="flex"> <div className="flex">
<SidebarDesign2 className="w-1/5" /> <SidebarDesign2 className="w-1/5" />
<span className="w-4/5 "> <span className="w-4/5 ">
<ReactTable4 /> <ReactTable4 />
<FooterDesign1 /> <FooterDesign1 />
</span> </span>
</div> </div> */}
</div> </div>
</Provider> </Provider>
); );

@ -19,12 +19,12 @@ export const Settings = ({ allColumns, getToggleHideAllColumnsProps }) => {
</div> </div>
{/* modal */} {/* modal */}
<div <div
className={`cursor-pointer w-screen h-screen backdrop-filter backdrop-blur-lg flex items-center justify-center bg-gray-900 fixed left-0 top-0 duration-1000 transition-all className={`cursor-pointer w-screen h-screen backdrop-filter backdrop-blur-lg bg-opacity-90 bg-gray-600 flex items-center justify-center fixed left-0 top-0
${openModal ? "opacity-90" : "opacity-0 pointer-events-none"}`} ${openModal ? "opacity-80" : "opacity-0 pointer-events-none"}`}
onClick={() => setOpenModal(false)} onClick={() => setOpenModal(false)}
> >
<div <div
className="absolute bg-white" className="absolute bg-white w-8/12 p-4 rounded"
style={{ top: "10%" }} style={{ top: "10%" }}
onClick={(e) => e.stopPropagation()} onClick={(e) => e.stopPropagation()}
onClick={() => setOpenModal(false)} onClick={() => setOpenModal(false)}

@ -5,13 +5,26 @@ export const ToggleColumns = ({ allColumns, getToggleHideAllColumnsProps }) => {
return ( return (
<div> <div>
<div> <h2 className="text-base">
<input type="checkbox" {...getToggleHideAllColumnsProps()} /> Toggle All با زدن بر روی هر یک از چک باکس ها میتوانید نمایش ستون هارو خاموش روشن
کنید{" "}
</h2>
<div className="text-sm mt-5">
<input
className="ml-2"
type="checkbox"
{...getToggleHideAllColumnsProps()}
/>{" "}
تاگل کردن همه
</div> </div>
{allColumns.map((column, index) => ( {allColumns.map((column, index) => (
<div key={index}> <div key={index}>
<label> <label className="text-sm">
<input type="checkbox" {...column.getToggleHiddenProps()} /> <input
type="checkbox"
className="ml-2 "
{...column.getToggleHiddenProps()}
/>
{column.Header} {column.Header}
</label> </label>
</div> </div>

Loading…
Cancel
Save