-
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.
* feat: deployment page structure and overview components * feat: projects and deployment json API * feat: removed useless mock * feat: toolbar by API * feat: project and deployment toolbar * feat: overview page and extend components features
- Loading branch information
Showing
11 changed files
with
599 additions
and
448 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { Card, Space, Typography } from "antd"; | ||
import styles from "./styles.module.scss"; | ||
import widgets from ".."; | ||
|
||
const Panel = ({title, content}) => { | ||
let panelContent; | ||
|
||
if (Array.isArray(content)) { | ||
panelContent = content.map(el => { | ||
const Component = widgets[el.kind]; | ||
return <Component {...el.spec.app.props} /> | ||
}) | ||
} else { | ||
const Component = widgets[content.kind]; | ||
panelContent = <Component {...content.spec.app.props} /> | ||
} | ||
|
||
return ( | ||
<Card | ||
className={styles.card} | ||
title={ | ||
<Space size="large" className={styles.header}> | ||
<div className={styles.details}> | ||
<Typography.Title className={styles.title} ellipsis level={2} title={title}>{title}</Typography.Title> | ||
</div> | ||
</Space> | ||
} | ||
> | ||
{panelContent} | ||
</Card> | ||
) | ||
} | ||
|
||
export default Panel; |
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,28 @@ | ||
@import '../../../theme/global.scss'; | ||
|
||
.card { | ||
|
||
:global .ant-card-head { | ||
border: none; | ||
} | ||
|
||
.header { | ||
width: 100%; | ||
|
||
> div:nth-child(2) { | ||
min-width: calc(100% - 88px); | ||
} | ||
|
||
.details { | ||
|
||
.title { | ||
font-weight: 300; | ||
} | ||
} | ||
} | ||
|
||
p { | ||
font-size: $mTextSize; | ||
} | ||
|
||
} |
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,9 @@ | ||
import { Typography } from "antd"; | ||
import styles from "./styles.module.scss"; | ||
const Paragraph = ({text}) => { | ||
return ( | ||
<Typography.Paragraph className={styles.paragraph}>{text}</Typography.Paragraph> | ||
) | ||
} | ||
|
||
export default Paragraph; |
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,5 @@ | ||
@import '../../../theme/global.scss'; | ||
|
||
.paragraph { | ||
font-size: $mTextSize; | ||
} |
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,21 @@ | ||
import { Avatar, Space, Typography } from "antd"; | ||
import styles from "./styles.module.scss"; | ||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | ||
import { getColorCode } from "../../../utils/colors"; | ||
|
||
|
||
const RichElement = ({icon, color, title, description}) => { | ||
|
||
|
||
return ( | ||
<Space size="large" className={styles.richElement}> | ||
<Avatar style={{ backgroundColor: getColorCode(color) }} size={64} icon={<FontAwesomeIcon icon={icon} />} /> | ||
<div className={styles.details}> | ||
<Typography.Title className={styles.title} ellipsis level={2} title={title}>{title}</Typography.Title> | ||
<Typography.Paragraph>{description}</Typography.Paragraph> | ||
</div> | ||
</Space> | ||
) | ||
} | ||
|
||
export default RichElement; |
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,12 @@ | ||
@import '../../../theme/global.scss'; | ||
|
||
.richElement { | ||
width: 100%; | ||
|
||
.details { | ||
|
||
.title { | ||
font-weight: 300; | ||
} | ||
} | ||
} |
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