added and updated

master
mahdi andalib 3 years ago
parent 24c6c45701
commit a59f1f733f
  1. 2
      src/App.js
  2. 33
      src/components/ReactTable4/BasicTable.js
  3. 15
      src/components/ReactTable4/ToggleColumns.js
  4. 4
      src/components/ReactTable4/black-arrow-left.svg
  5. 4
      src/components/ReactTable4/gray-arrow-left.svg
  6. 5
      src/components/ReactTable4/index.js
  7. 6
      src/components/VodProductNew/index.js

@ -67,7 +67,6 @@ function App() {
{/* <BlogDesign4 /> */} {/* <BlogDesign4 /> */}
{/* <BlogDesign5 /> */} {/* <BlogDesign5 /> */}
{/* <BlogDesign6 /> */} {/* <BlogDesign6 /> */}
{/* <ContactInfoSection /> */} {/* <ContactInfoSection /> */}
{/* <Testttt /> */} {/* <Testttt /> */}
{/* <Design2D /> */} {/* <Design2D /> */}
@ -84,7 +83,6 @@ function App() {
{/* <AdvertisementDesign3 /> */} {/* <AdvertisementDesign3 /> */}
{/* <CourseChapter /> */} {/* <CourseChapter /> */}
{/* <SidebarMenu /> */} {/* <SidebarMenu /> */}
{/* <SimpleBarChart /> */} {/* <SimpleBarChart /> */}
{/* <SpecifiedDomainRadarChart /> */} {/* <SpecifiedDomainRadarChart /> */}
{/* <Design1 /> */} {/* <Design1 /> */}

@ -47,32 +47,6 @@ const BasicTable = ({
[] []
); );
const EditableCell = ({
value: initialValue,
row: { index },
column: { id },
updateMyData, // This is a custom function that we supplied to our table instance
}) => {
// We need to keep and update the state of the cell normally
const [value, setValue] = React.useState(initialValue);
const onChange = (e) => {
setValue(e.target.value);
};
// We'll only update the external data when the input is blurred
const onBlur = () => {
updateMyData(index, id, value);
};
// If the initialValue is changed external, sync it up with our state
React.useEffect(() => {
setValue(initialValue);
}, [initialValue]);
return <input value={value} onChange={onChange} onBlur={onBlur} />;
};
// یعنی فیلتر دیفالت هدر های ما سرچ خواهد بود مگه اینکه خودمون تغییرش بدیم // یعنی فیلتر دیفالت هدر های ما سرچ خواهد بود مگه اینکه خودمون تغییرش بدیم
const defaultColumn = useMemo(() => { const defaultColumn = useMemo(() => {
return { return {
@ -191,7 +165,12 @@ const BasicTable = ({
/> />
</div> </div>
{/* settings icon */} {/* settings icon */}
{settingsIcon && <Settings />} {settingsIcon && (
<Settings
allColumns={allColumns}
getToggleHideAllColumnsProps={getToggleHideAllColumnsProps}
/>
)}
</div> </div>
) : null} ) : null}
</div> </div>

@ -1,12 +1,23 @@
import React from "react"; import React from "react";
export const ToggleColumns = ({ allColumns, getToggleHideAllColumnsProps }) => { export const ToggleColumns = ({ allColumns, getToggleHideAllColumnsProps }) => {
// console.log(allColumns);
return ( return (
<div> <div>
<div> <div>
<input type="checkbox" {...getToggleHideAllColumnsProps()} /> Toggle All <input type="checkbox" {...getToggleHideAllColumnsProps()} /> Toggle All
</div> </div>
{allColumns {allColumns.map((column, index) => (
<div key={index}>
<label>
<input type="checkbox" {...column.getToggleHiddenProps()} />
{column.Header}
</label>
</div>
))}
{/* اگر میخواستیم فیلتر بزاریم */}
{/* {allColumns
.filter((column) => column.Header === "string") .filter((column) => column.Header === "string")
.map((column, index) => ( .map((column, index) => (
<div key={index}> <div key={index}>
@ -15,7 +26,7 @@ export const ToggleColumns = ({ allColumns, getToggleHideAllColumnsProps }) => {
{column.Header} {column.Header}
</label> </label>
</div> </div>
))} ))} */}
</div> </div>
); );
}; };

@ -0,0 +1,4 @@
<svg id="arrow-left" xmlns="http://www.w3.org/2000/svg" width="10.112" height="10.112" viewBox="0 0 10.112 10.112">
<path id="Vector" d="M2.99,6.674.243,3.927a.837.837,0,0,1,0-1.18L2.99,0" transform="translate(3.329 1.719)" fill="none" stroke="#00253a" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path id="Vector-2" data-name="Vector" d="M0,0H10.112V10.112H0Z" transform="translate(10.112 10.112) rotate(180)" fill="none" opacity="0"/>
</svg>

After

Width:  |  Height:  |  Size: 470 B

@ -0,0 +1,4 @@
<svg id="arrow-left" xmlns="http://www.w3.org/2000/svg" width="10.112" height="10.112" viewBox="0 0 10.112 10.112">
<path id="Vector" d="M2.99,6.674.243,3.927a.837.837,0,0,1,0-1.18L2.99,0" transform="translate(3.329 1.719)" fill="none" stroke="#cbcbcb" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path id="Vector-2" data-name="Vector" d="M0,0H10.112V10.112H0Z" transform="translate(10.112 10.112) rotate(180)" fill="none" opacity="0"/>
</svg>

After

Width:  |  Height:  |  Size: 470 B

@ -2,6 +2,9 @@ import React, { useRef, useState } from "react";
import BasicTable from "./BasicTable"; import BasicTable from "./BasicTable";
import grayLeftArrow from "./gray-arrow-left.svg";
import blackLeftArrow from "./black-arrow-left.svg";
const ReactTable4 = ({ breadCrumbs, subTitle, title }) => { const ReactTable4 = ({ breadCrumbs, subTitle, title }) => {
const [tabs, setTabs] = useState([ const [tabs, setTabs] = useState([
{ name: "جدول " + breadCrumbs[breadCrumbs.length - 1].name, id: 0 }, { name: "جدول " + breadCrumbs[breadCrumbs.length - 1].name, id: 0 },
@ -45,7 +48,7 @@ const ReactTable4 = ({ breadCrumbs, subTitle, title }) => {
breadCrumb.active ? "text-blue-900" : "text-blue-400" breadCrumb.active ? "text-blue-900" : "text-blue-400"
}`} }`}
> >
{" > "} <img src={grayLeftArrow} />
</div> </div>
)} )}
</div> </div>

@ -39,7 +39,7 @@ const VodProduct = ({
rangeWidth, rangeWidth,
}) => { }) => {
const [progressFlag, setProgressFlag] = useState(false); const [progressFlag, setProgressFlag] = useState(false);
// const [openModal, setOpenModal] = useState(false); const [openModal, setOpenModal] = useState(false);
useEffect(() => { useEffect(() => {
setTimeout(() => { setTimeout(() => {
setProgressFlag(true); setProgressFlag(true);
@ -88,13 +88,13 @@ const VodProduct = ({
{/* play button */} {/* play button */}
<div <div
className={` rounded-full p-4 group-hover:scale-125 transform transition-transform duration-300 bg-playButtonIcon`} className={` rounded-full p-4 group-hover:scale-125 transform transition-transform duration-300 bg-playButtonIcon`}
// onClick={() => setOpenModal(true)} onClick={() => setOpenModal(true)}
> >
<img <img
src={whitePlayIcon} src={whitePlayIcon}
alt="" alt=""
className="w-5 h-5" className="w-5 h-5"
// onClick={() => setOpenModal(true)} onClick={() => setOpenModal(true)}
/> />
</div> </div>
{/* select Color */} {/* select Color */}

Loading…
Cancel
Save