-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Break up structure with directories * Split out Option * Option card areas are themselves toggles
- Loading branch information
1 parent
a4e9eb9
commit 9ac6f26
Showing
17 changed files
with
129 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/simple-editor/DeploymentConfig.tsx → ...le-editor/deployment/DeploymentConfig.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
|
||
import React from 'react'; | ||
|
||
import { | ||
Card, CardHeader, CardContent, CardActions, CardActionArea | ||
} from '@mui/material'; | ||
import { Typography, ToggleButton, ToggleButtonGroup } from '@mui/material'; | ||
import { Check, } from '@mui/icons-material'; | ||
import { blue } from '@mui/material/colors'; | ||
|
||
const Option = ({enabled, onChange, avatar, title, content} : { | ||
enabled : boolean; | ||
onChange : () => void, | ||
avatar : any; | ||
title : string; | ||
content : any; | ||
}) => { | ||
|
||
const Header = () => { | ||
|
||
if (enabled) { | ||
return ( | ||
<CardHeader | ||
sx={{ | ||
backgroundColor: blue[200] | ||
}} | ||
avatar={avatar} | ||
title={title} | ||
subheader={ | ||
<Typography variant="body"> | ||
active | ||
</Typography> | ||
} | ||
/> | ||
); | ||
} else { | ||
return ( | ||
<CardHeader | ||
avatar={avatar} | ||
title={title} | ||
subheader={ | ||
<Typography variant="body"> | ||
available | ||
</Typography> | ||
} | ||
/> | ||
); | ||
} | ||
|
||
} | ||
|
||
const Content = () => { | ||
|
||
if (enabled) { | ||
return ( | ||
<CardContent sx={{ | ||
height: '4rem', backgroundColor: blue[200] | ||
}}> | ||
<Typography | ||
variant="body2" | ||
sx={{ fontSize: 12 }} | ||
> | ||
{content} | ||
</Typography> | ||
</CardContent> | ||
); | ||
} else { | ||
return ( | ||
<CardContent sx={{height: '4rem'}}> | ||
<Typography | ||
variant="body2" | ||
sx={{ fontSize: 12 }} | ||
> | ||
{content} | ||
</Typography> | ||
</CardContent> | ||
); | ||
} | ||
|
||
} | ||
|
||
return ( | ||
<Card sx={{ width: '16rem' }}> | ||
<CardActionArea onClick={() => onChange()}> | ||
<Header | ||
sx={{ backgroundColor: "primary.dark", color: "primary.contrastText" }} | ||
avatar={avatar} | ||
title={title} | ||
/> | ||
<Content/> | ||
</CardActionArea> | ||
</Card> | ||
); | ||
}; | ||
|
||
export default Option; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.