Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix named import bug from big Ron merge. #535

Merged
merged 1 commit into from
Dec 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bldrs",
"version": "1.0.0-r653",
"version": "1.0.0-r584",
"main": "src/index.jsx",
"license": "MIT",
"homepage": "https://github.com/bldrs-ai/Share",
Expand Down
34 changes: 18 additions & 16 deletions src/Components/ExpansionPanel.jsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
import React, {useState, useEffect} from 'react'
import Box from '@mui/material'
import Accordion from '@mui/material'
import AccordionSummary from '@mui/material'
import AccordionDetails from '@mui/material'
import Typography from '@mui/material'
import React, {useEffect, useState} from 'react'
import Box from '@mui/material/Box'
import Accordion from '@mui/material/Accordion'
import AccordionSummary from '@mui/material/AccordionSummary'
import AccordionDetails from '@mui/material/AccordionDetails'
import Typography from '@mui/material/Typography'
import useTheme from '@mui/styles/useTheme'
import CaretIcon from '../assets/2D_Icons/Caret.svg'


/**
* Expansion panels are used to package property sets
*
* @param {string} detail title of the panel
* @param {string} summary content of the panel
* @param {boolean} expandState global control of the panel
* @param {object} classes styles for the panel
* @return {object}
* @property {string} summary content of the panel
* @property {string} detail title of the panel
* @property {boolean} expandState global control of the panel
* @return {React.ReactElement}
*/
export default function Property({detail, summary, expandState}) {
useEffect(() => setExpand(expandState), [expandState])
export default function ExpansionPanel({summary, detail, expandState}) {
const theme = useTheme()
const [expand, setExpand] = useState()
const [expanded, setExpanded] = useState(expandState)

useEffect(() => {
setExpanded(expandState)
}, [expandState])


return (
Expand All @@ -46,8 +48,8 @@ export default function Property({detail, summary, expandState}) {
marginLeft: '12px',
},
}}
expanded={expand === true}
onChange={() => setExpand(!expand)}
expanded={expanded}
onChange={() => setExpanded(!expanded)}
>
<AccordionSummary
expandIcon={<CaretIcon/>}
Expand Down