diff --git a/packages/web/components/elements/Table-Responsive.tsx b/packages/web/components/elements/Table-Responsive.tsx deleted file mode 100644 index 72a66d626..000000000 --- a/packages/web/components/elements/Table-Responsive.tsx +++ /dev/null @@ -1,115 +0,0 @@ -// import React from 'react' -// import { Table, Thead, Tbody, Tr, Th, Td } from 'react-super-responsive-table' -// import 'react-super-responsive-table/dist/SuperResponsiveTableStyle.css' -// import { IconButton } from './Button' -// import { PencilSimple, Trash } from 'phosphor-react' -// import { isDarkTheme } from '../../lib/themeUpdater' -// import { Box, SpanBox } from './LayoutPrimitives' -// import { StyledText } from './StyledText' - -// interface TableProps { -// heading: string -// infoLink?: string -// onAdd?: () => void -// headers: string[] -// rows: Map> -// onDelete?: (id: string) => void -// onEdit?: (obj: any) => void -// } - -// export default function TableR(props: TableProps): JSX.Element { -// const { headers } = props -// const iconColor = isDarkTheme() ? '#D8D7D5' : '#5F5E58' -// return ( -// <> -// -// {props.heading} -// -// -// -// -// -// {headers.map((header: string, index: number) => ( -// -// ))} -// -// -// -// {Array.from(props.rows.keys()).map((key, index) => ( -// -// {Object.values(props.rows.get(key) || {}).map((cell, index) => ( -// -// ))} - -// {props.onDelete && ( -// -// )} -// {props.onEdit && ( -// -// )} -// -// ))} -// -//
-// -// {header} -// -//
-// -// {cell} -// -// -// { -// props.onDelete && props.onDelete(key) -// }} -// > -// -// -// -// { -// props.onEdit && -// props.onEdit({ ...props.rows.get(key), id: key }) -// }} -// > -// -// -//
-//
-// -// ) -// } diff --git a/packages/web/components/elements/Table.tsx b/packages/web/components/elements/Table.tsx index 299fbaf24..ccc117b79 100644 --- a/packages/web/components/elements/Table.tsx +++ b/packages/web/components/elements/Table.tsx @@ -1,14 +1,13 @@ +import { isDarkTheme } from '../../lib/themeUpdater' +import { Table, Thead, Tbody, Tr, Th, Td } from 'react-super-responsive-table' +import { PencilSimple, Plus, Trash } from 'phosphor-react' import { Box, SpanBox, VStack } from './LayoutPrimitives' import { styled } from '../tokens/stitches.config' import { StyledText } from './StyledText' import { InfoLink } from './InfoLink' import { Button } from './Button' -import { PencilSimple, Plus, Trash } from 'phosphor-react' -import { isDarkTheme } from '../../lib/themeUpdater' -import { Table, Thead, Tbody, Tr, Th, Td } from 'react-super-responsive-table' import 'react-super-responsive-table/dist/SuperResponsiveTableStyle.css' import { IconButton } from './Button' - interface TableProps { heading: string infoLink?: string @@ -26,63 +25,6 @@ const HeaderWrapper = styled(Box, { }, }) -// const TableCard = styled(Box, { -// backgroundColor: '$grayBg', -// display: 'flex', -// alignItems: 'center', -// padding: '10px 12px', -// border: '0.5px solid $grayBgActive', -// width: '100%', - -// '&:hover': { -// border: '0.5px solid #FFD234', -// }, -// '@md': { -// paddingLeft: '0', -// }, -// }) - -// const TableHeading = styled(Box, { -// backgroundColor: '$grayBgActive', -// border: '1px solid rgba(0, 0, 0, 0.06)', -// display: 'none', -// alignItems: 'center', -// padding: '14px 0 14px 40px', -// borderRadius: '5px 5px 0px 0px', -// width: '100%', -// '@md': { -// display: 'flex', -// }, -// }) - -// const Input = styled('input', { -// backgroundColor: 'transparent', -// color: '$grayTextContrast', -// marginTop: '5px', -// '&[disabled]': { -// border: 'none', -// }, -// }) - -// const IconButton = styled(Button, { -// variants: { -// style: { -// ctaWhite: { -// color: 'red', -// padding: '10px', -// display: 'flex', -// justifyContent: 'center', -// alignItems: 'center', -// border: '1px solid $grayBorder', -// boxSizing: 'border-box', -// borderRadius: 6, -// width: 40, -// height: 40, -// }, -// }, -// }, -// }) - export function TableR(props: TableProps): JSX.Element { const iconColor = isDarkTheme() ? '#D8D7D5' : '#5F5E58' @@ -143,111 +85,6 @@ export function TableR(props: TableProps): JSX.Element { )} - {/* - {props.headers.map((header, index) => ( - - - {header} - - - ))} - - */} - {/* {Array.from(props.rows.keys()).map((key, index) => ( - - - {Object.values(props.rows.get(key) || {}).map((cell, index) => ( - - - - ))} - {props.onEdit && ( - { - props.onEdit && - props.onEdit({ ...props.rows.get(key), id: key }) - }} - > - - - )} - {props.onDelete && ( - { - props.onDelete && props.onDelete(key) - }} - > - - - )} - - - ))} */} - {/* - {props.heading} - */} { props.onDelete && props.onDelete(key) }} @@ -318,7 +155,7 @@ export function TableR(props: TableProps): JSX.Element { { props.onEdit && props.onEdit({ ...props.rows.get(key), id: key })