import * as React from "react"; import { Accordion, Grid, Container, Button, Box, TableCell, } from "@mui/material"; import AccordionSummary from "@mui/material/AccordionSummary"; import AccordionDetails from "@mui/material/AccordionDetails"; import Typography from "@mui/material/Typography"; import ExpandMoreIcon from "@mui/icons-material/ExpandMore"; import ArrowUpwardIcon from "@mui/icons-material/ArrowUpward"; import ArrowDownwardIcon from "@mui/icons-material/ArrowDownward"; import CustomizedTables from "./Table_"; import "./table.css"; export default function SimpleAccordion(props) { const [values, setValues] = React.useState(props.data); const [channel, setChannel] = React.useState(props.channel); return (
{/* for now just add static .. later on ... map through given data to render each table as accordin*/} } aria-controls="panel1a-content" id="panel1a-header" > {channel.companyName} {`${'$'+ Math.abs(values[0].Close).toFixed(5)}`} = 0 ? "green" : "red" } sx={{ border: "none", padding:'0rem 6rem 0rem 1rem' }} > = 0 ? "text-success" : "text-danger" }>{ values[0].Close - values[1].Close >= 0 ? ( ) : ( ) } {`${ '$' +(Math.abs(values[0].Close - values[1].Close) ).toFixed(5)}`} = 0 ? "text-success" : "text-danger" }>{ values[0].Close - values[1].Close >= 0 ? ( ) : ( )} {`${( (Math.abs( values[0].Close - values[1].Close ) / values[0].Close) * 100 ).toFixed(3)}%`}
); }