Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 4 additions & 16 deletions apps/studio/src/modules/whats-new/components/whats-new-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,10 @@ const PageContent = ( {
description,
learnMoreUrl,
learnMoreLabel,
isIntroPage = false,
}: Omit< WhatsNewPage, 'image' > & { isIntroPage?: boolean } ) => (
}: Omit< WhatsNewPage, 'image' > ) => (
<div className="px-8 pt-3 pb-2 flex flex-col h-full">
<h2 className="text-xl mb-2 text-frame-text line-clamp-2">{ title }</h2>
<p
className={ cx(
'text-frame-text text-m leading-s',
isIntroPage ? 'line-clamp-5' : 'line-clamp-3'
) }
>
{ description }
</p>
<p className="text-frame-text text-m leading-s line-clamp-5">{ description }</p>
<div className="mt-2 mb-4">
{ learnMoreUrl && (
<button
Expand Down Expand Up @@ -120,7 +112,7 @@ export default function WhatsNewModal( { showModal, onClose }: WhatsNewModalProp
'[&_*]:select-none',
'focus:outline-none'
) }
pages={ whatsNewPages.map( ( { image, title, ...pageContent }, index ) => ( {
pages={ whatsNewPages.map( ( { image, title, ...pageContent } ) => ( {
image: (
<div className="relative">
<div className="absolute top-[13px] left-[13px] rtl:left-auto rtl:right-[13px] bg-a8c-gray-90 text-a8c-gray-5 text-xs px-2 py-1 rounded-sm">
Expand All @@ -133,11 +125,7 @@ export default function WhatsNewModal( { showModal, onClose }: WhatsNewModalProp
/>
</div>
),
content: (
<div className={ index === 0 ? 'whats-new-intro-page' : '' }>
<PageContent title={ title } { ...pageContent } isIntroPage={ index === 0 } />
</div>
),
content: <PageContent title={ title } { ...pageContent } />,
} ) ) }
finishButtonText={ __( 'Done' ) }
nextButtonText={ __( 'Next' ) }
Expand Down