-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #118 from platformatic/15-add-missing-details-for-…
…template-and-plugins 15 add missing details for template and plugins
- Loading branch information
Showing
22 changed files
with
396 additions
and
89 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,94 @@ | ||
'use strict' | ||
import PropTypes from 'prop-types' | ||
import typographyStyles from '~/styles/Typography.module.css' | ||
import commonStyles from '~/styles/CommonStyles.module.css' | ||
import styles from './PluginDetail.module.css' | ||
import Title from '~/components/ui/Title' | ||
import { Button, HorizontalSeparator, Icons, Tag } from '@platformatic/ui-components' | ||
import { MARGIN_0, OPACITY_30, RICH_BLACK, SMALL, WHITE } from '@platformatic/ui-components/src/components/constants' | ||
|
||
function PluginDetail ({ name, description, tags, author, onClickSelectPlugin }) { | ||
return ( | ||
<div className={styles.container}> | ||
<div className={`${commonStyles.largeFlexBlock} ${commonStyles.fullWidth}`}> | ||
<div className={commonStyles.mediumFlexBlock}> | ||
<Title | ||
title={name} | ||
iconName='StackablesPluginIcon' | ||
dataAttrName='cy' | ||
dataAttrValue='modal-title' | ||
/> | ||
<p className={`${typographyStyles.desktopBodyLarge} ${typographyStyles.textWhite} ${typographyStyles.opacity70}`}>{description}</p> | ||
<div className={`${commonStyles.mediumFlexRow} ${commonStyles.fullWidth} ${commonStyles.itemsCenter} `}> | ||
<div className={`${commonStyles.smallFlexRow} ${commonStyles.itemsCenter}`}> | ||
<Icons.UserComputerIcon color={WHITE} size={SMALL} /> | ||
<span className={`${typographyStyles.desktopBodyLarge} ${typographyStyles.textWhite} ${typographyStyles.opacity70}`}>{author}</span> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<HorizontalSeparator marginBottom={MARGIN_0} marginTop={MARGIN_0} color={WHITE} opacity={OPACITY_30} /> | ||
{tags.length > 0 && ( | ||
<div className={`${commonStyles.mediumFlexBlock} ${commonStyles.fullWidth}`}> | ||
<h4 className={`${typographyStyles.desktopHeadline4} ${typographyStyles.textWhite}`}>Tags</h4> | ||
<div className={`${commonStyles.smallFlexRow} ${commonStyles.fullWidth}`}> | ||
{tags.map(tag => | ||
<Tag | ||
key={tag} | ||
text={tag.toUpperCase()} | ||
textClassName={`${typographyStyles.desktopOtherOverlineNormal} ${typographyStyles.textWhite}`} | ||
backgroundColor={WHITE} | ||
bordered={false} | ||
opaque={OPACITY_30} | ||
fullRounded | ||
/>)} | ||
</div> | ||
|
||
</div> | ||
)} | ||
</div> | ||
|
||
<Button | ||
classes={commonStyles.buttonPadding} | ||
label={`Select ${name}`} | ||
backgroundColor={WHITE} | ||
color={RICH_BLACK} | ||
fullWidth | ||
bordered={false} | ||
onClick={() => onClickSelectPlugin()} | ||
/> | ||
</div> | ||
) | ||
} | ||
|
||
PluginDetail.propTypes = { | ||
/** | ||
* name | ||
*/ | ||
name: PropTypes.string.isRequired, | ||
/** | ||
* description | ||
*/ | ||
description: PropTypes.string, | ||
/** | ||
* tags | ||
*/ | ||
tags: PropTypes.arrayOf(PropTypes.string), | ||
/** | ||
* author | ||
*/ | ||
author: PropTypes.string, | ||
/** | ||
* onClickSelectPlugin | ||
*/ | ||
onClickSelectPlugin: PropTypes.func | ||
} | ||
|
||
PluginDetail.defaultProps = { | ||
description: '', | ||
tags: [], | ||
author: '', | ||
onClickSelectPlugin: () => {} | ||
} | ||
|
||
export default PluginDetail |
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,3 @@ | ||
.container { | ||
@apply flex flex-col justify-between h-full w-full | ||
} |
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
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
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
Oops, something went wrong.