diff --git a/src/components/shared/checkbox-field/checkbox-field.module.scss b/src/components/shared/checkbox-field/checkbox-field.module.scss index 90e30d5069..9bb5919b49 100644 --- a/src/components/shared/checkbox-field/checkbox-field.module.scss +++ b/src/components/shared/checkbox-field/checkbox-field.module.scss @@ -15,7 +15,8 @@ &:before { content: ''; - display: block; + display: inline-flex; + justify-content: center; width: 24px; height: 24px; border: 1px solid $color-additional-1; diff --git a/src/components/shared/extension-card/extension-card.module.scss b/src/components/shared/extension-card/extension-card.module.scss index 5f2ca82d9d..17c3a2f184 100644 --- a/src/components/shared/extension-card/extension-card.module.scss +++ b/src/components/shared/extension-card/extension-card.module.scss @@ -1,20 +1,14 @@ .wrapper { position: relative; - display: flex; - align-items: flex-start; - padding: 20px; + padding: 16px 19px; text-decoration: none; color: $color-primary; width: 100%; + flex-grow: 1; background: $color-tertiary; + cursor: pointer; &.withCheckbox { - cursor: pointer; - - & .name { - padding-right: 25px; - } - &.checked .name { color: $color-accent-primary; } @@ -25,17 +19,21 @@ color: $color-accent-primary; } } + + @include xs-down { + padding: 12px; + } } .checkbox { position: absolute; - top: 20px; - right: 20px; -} + top: 18px; + right: 16px; -.checked { - outline: 1px solid #7d64ff; - box-shadow: 0px 1px 5px rgba(60, 60, 100, 0.05); + @include xs-down { + top: 12px; + right: 12px; + } } .imageWrapper { @@ -81,16 +79,13 @@ .tiers-wrapper { display: flex; - flex-wrap: wrap; - width: 100%; align-items: center; list-style-type: none; padding: 0; - margin-top: 0; - margin-bottom: 0px; + margin: 0; li + li { - margin-left: 8px; + margin-left: 6px; &::before { content: ''; @@ -115,23 +110,6 @@ margin-right: 8px; } -.logo-wrapper { - margin-left: auto !important; - max-height: 28px; - //position: absolute; - //top: 20px; - //right: 20px; - - &:before { - content: none; - } -} - -.logo { - position: relative; - max-height: inherit; -} - .tier { position: relative; display: flex; @@ -172,15 +150,23 @@ } .name-wrapper { - margin-top: 10px; + padding-right: 30px; text-align: left; } .name { + position: relative; font-size: $font-size-lg; line-height: $line-height-lg; font-weight: 700; + text-decoration: none; transition: color 0.3s; + color: $color-primary; + cursor: pointer; + + &:hover { + color: #7d64ff; + } } .type { @@ -202,7 +188,7 @@ } .description { - margin-bottom: 15px; + margin-bottom: 21px; font-size: $font-size-sm; line-height: $line-height-sm; margin-top: 10px; @@ -212,23 +198,32 @@ .external { margin-top: auto; display: flex; - gap: 16px; + align-items: center; + column-gap: 10px; + width: 100%; font-weight: 400; font-size: 13px; line-height: 20px; - color: #9691af; + color: #8b85ad; + letter-spacing: -0.05em; + pointer-events: none; + + @media (min-width: 1200px) and (max-width: 1320px) { + column-gap: 5px; + } } .stars, .cloud { display: flex; align-items: center; + white-space: nowrap; &:before { content: ''; display: inline-block; vertical-align: middle; - margin-right: 8px; + margin-right: 4px; background-position: center; background-repeat: no-repeat; background-size: contain; @@ -239,7 +234,6 @@ &:before { width: 14px; height: 14px; - margin: 0 4px; background-image: url(./svg/star.inline.svg); } } diff --git a/src/components/shared/extension-card/extension-card.view.js b/src/components/shared/extension-card/extension-card.view.js index 5b5b4065f3..c544ace059 100644 --- a/src/components/shared/extension-card/extension-card.view.js +++ b/src/components/shared/extension-card/extension-card.view.js @@ -1,4 +1,5 @@ import classNames from 'classnames'; +import { CheckboxField } from 'components/shared/checkbox-field'; import { ItemCard, styles as itemCardStyles, @@ -7,6 +8,24 @@ import React from 'react'; import styles from './extension-card.module.scss'; +const parseString = (str) => { + let string = str.replace(/-/gi, '-'); + + // Find the last occurrence of '' + const lastIndex = string.lastIndexOf(''); + + if (lastIndex !== -1) { + // Wrap the part of the string after the last '' with 'span' tags + const prefix = string.slice(0, lastIndex); + const suffix = string.slice(lastIndex + 8); // Length of '' + + // eslint-disable-next-line max-len + string = `${prefix}-${suffix}`; + } + + return string; +}; + export const ExtensionCard = ({ extension, searchTerm = '', @@ -14,8 +33,7 @@ export const ExtensionCard = ({ isChecked = false, onCheckboxClick = () => {}, }) => { - const { name, description, tiers, stars, cloudEnabled, url, logo } = - extension; + const { name, description, tiers, stars, cloudEnabled, url } = extension; const extensionName = searchTerm ? name.replace( new RegExp(searchTerm, 'gi'), @@ -48,9 +66,9 @@ export const ExtensionCard = ({ ); } + return ( - // eslint-disable-next-line react/jsx-indent - +
{children}
); @@ -63,37 +81,25 @@ export const ExtensionCard = ({ }`} >
- + {hasCheckbox && ( +
+ +
+ )}
-
+
    + {tiers.map((tier, index) => ( +
  • + {tier} +
  • + ))} +
{stars && {stars}} {cloudEnabled && ( Available in cloud diff --git a/src/styles/parts/global.scss b/src/styles/parts/global.scss index 59bc948623..da32d8ccc7 100644 --- a/src/styles/parts/global.scss +++ b/src/styles/parts/global.scss @@ -82,6 +82,10 @@ video { } } +.no-wrap { + white-space: nowrap; +} + body .show-md-down { @include md-down { display: initial; diff --git a/src/svg/external-link.inline.svg b/src/svg/external-link.inline.svg new file mode 100644 index 0000000000..391389c5e6 --- /dev/null +++ b/src/svg/external-link.inline.svg @@ -0,0 +1 @@ +