diff --git a/landing/competitor-feature-card.css b/landing/competitor-feature-card.css index f7c6eb3e2..ad6a3264d 100644 --- a/landing/competitor-feature-card.css +++ b/landing/competitor-feature-card.css @@ -1,17 +1,21 @@ .container { max-width: 432px; background-color: var(--comparison-cards); padding: 32px; border-radius: 16px; transition: background-color 150ms; } .container:hover { cursor: pointer; background-color: var(--comparison-cards-hovered); } .readMoreText { color: var(--violet-dark-100); margin-top: 16px; } + +.descriptionText { + min-height: 80px; +} diff --git a/landing/competitor-feature-card.react.js b/landing/competitor-feature-card.react.js index c7ff794da..a3ee498cf 100644 --- a/landing/competitor-feature-card.react.js +++ b/landing/competitor-feature-card.react.js @@ -1,49 +1,50 @@ // @flow import classNames from 'classnames'; import * as React from 'react'; import type { Competitors } from './competitor-data.js'; import css from './competitor-feature-card.css'; import CompetitorFeature from './competitor-feature.react.js'; import typography from './typography.css'; type Props = { +competitorID: Competitors, +title: string, +comingSoon: boolean, +competitorDescription: string, +commDescription: string, +onClick: () => mixed, }; function CompetitorFeatureCard(props: Props): React.Node { const { competitorID, title, comingSoon, competitorDescription, commDescription, onClick, } = props; const readMoreClassName = classNames([ typography.paragraph2, css.readMoreText, ]); return (

Read more

); } export default CompetitorFeatureCard; diff --git a/landing/competitor-feature.css b/landing/competitor-feature.css index e95f3271d..1647e54b4 100644 --- a/landing/competitor-feature.css +++ b/landing/competitor-feature.css @@ -1,52 +1,54 @@ .container { display: flex; flex-direction: column; flex: 1; } .headingContainer { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; row-gap: 8px; + /* We use 34px to match the coming soon badge's height and this + keep everything aligned */ + min-height: 34px; } .headingText { color: var(--white-100); } .comingSoonBadge { background-color: var(--badge); padding: 5px 10px; border-radius: 16px; } .comingSoonText { color: var(--white-100); margin-left: 8px; } .comingSoonIcon { color: var(--coming-soon-icon); } hr { margin: 24px 0; border-radius: 8px; height: 1.5px; background-color: var(--black-80); border: none; } .descriptionText { color: var(--white-80); - min-height: 80px; margin-top: 8px; } .descriptionTextMutli { color: var(--white-80); margin-top: 16px; } diff --git a/landing/competitor-feature.react.js b/landing/competitor-feature.react.js index 0adbb5318..54a4f7558 100644 --- a/landing/competitor-feature.react.js +++ b/landing/competitor-feature.react.js @@ -1,108 +1,112 @@ // @flow import { faWrench } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import classNames from 'classnames'; import * as React from 'react'; import CommLogo from './assets/comm-logo.react.js'; import type { Competitors } from './competitor-data.js'; import css from './competitor-feature.css'; import CompetitorLogo from './competitor-logo.react.js'; import typography from './typography.css'; function useDescriptionContent( description: string | $ReadOnlyArray, descriptionClassName, descriptionMultiClassName, ) { return React.useMemo(() => { if (typeof description === 'string') { return

{description}

; } const paragraphs = description.map((paragraph, index) => { const className = index > 0 ? descriptionMultiClassName : descriptionClassName; return (

{paragraph}

); }); return <>{paragraphs}; }, [description, descriptionClassName, descriptionMultiClassName]); } type Props = { +competitorID: Competitors, +title: string, +comingSoon: boolean, +competitorDescription: string | $ReadOnlyArray, +commDescription: string | $ReadOnlyArray, + +descriptionTextClassName?: string, }; function CompetitorFeature(props: Props): React.Node { const { competitorID, title, comingSoon, competitorDescription, commDescription, + descriptionTextClassName = '', } = props; const headingClassName = classNames([typography.heading3, css.headingText]); const comingSoonClassName = classNames([ typography.paragraph3, css.comingSoonText, ]); const descriptionClassName = classNames([ typography.paragraph1, css.descriptionText, + descriptionTextClassName, ]); const descriptionMultiClassName = classNames([ typography.paragraph1, css.descriptionTextMutli, + descriptionTextClassName, ]); let comingSoonBadge; if (comingSoon) { comingSoonBadge = (
Coming Soon
); } const competitorInfo = useDescriptionContent( competitorDescription, descriptionClassName, descriptionMultiClassName, ); const commInfo = useDescriptionContent( commDescription, descriptionClassName, descriptionMultiClassName, ); return (

{title}

{comingSoonBadge}
{competitorInfo}
{commInfo}
); } export default CompetitorFeature; diff --git a/landing/feature-modal.css b/landing/feature-modal.css index ecc0c09c0..03c2728ce 100644 --- a/landing/feature-modal.css +++ b/landing/feature-modal.css @@ -1,44 +1,44 @@ .modalContainer { background-color: var(--comparison-cards); border-radius: 8px; - padding: 24px 32px; + padding: 32px; width: 624px; max-width: 90vw; max-height: 90vh; overflow-y: auto; } .featureContainer { display: flex; } .closeIconContainer { margin-left: 22px; cursor: pointer; } .closeIcon { color: var(--white-80); } .furtherReadingContainer { border-top: 1px solid var(--black-80); padding-top: 24px; margin-top: 24px; } .furtherReadingsText { color: var(--white-100); margin-bottom: 16px; } .linksContainer { display: flex; flex-direction: column; row-gap: 8px; } .linkText { color: var(--violet-dark-100); text-decoration: underline; }