Skip to content

Commit c46d2af

Browse files
authored
Merge pull request #861 from devtron-labs/feat/freemium-messaging
feat: update freemium messaging and error messaging
2 parents 5783766 + 798f55c commit c46d2af

File tree

5 files changed

+18
-17
lines changed

5 files changed

+18
-17
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "1.19.3",
3+
"version": "1.19.4",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Shared/Components/GenericModal/GenericModal.component.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ const GenericModal = ({
8282
name,
8383
open,
8484
width = 600,
85+
borderRadius = 8,
8586
onClose,
8687
onEscape = noop,
8788
closeOnBackdropClick = false,
@@ -92,7 +93,7 @@ const GenericModal = ({
9293
<GenericModalProvider value={{ name, onClose }}>
9394
<Backdrop onEscape={onEscape} onClick={closeOnBackdropClick ? onClose : noop}>
9495
<motion.div
95-
className={`shadow__modal flexbox-col bg__primary border__secondary br-8 dc__m-auto mt-40 dc__overflow-hidden ${MODAL_WIDTH_TO_CLASS_NAME_MAP[width]}`}
96+
className={`shadow__modal flexbox-col bg__primary border__secondary br-${borderRadius} dc__m-auto mt-40 dc__overflow-hidden ${MODAL_WIDTH_TO_CLASS_NAME_MAP[width]}`}
9697
exit={{ y: 100, opacity: 0, scale: 0.75, transition: { duration: 0.35 } }}
9798
initial={{ y: 100, opacity: 0, scale: 0.75 }}
9899
animate={{ y: 0, opacity: 1, scale: 1 }}

src/Shared/Components/GenericModal/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export interface GenericModalProps extends Partial<Pick<BackdropProps, 'onEscape
2929
* @default 600
3030
*/
3131
width?: 450 | 500 | 600 | 800
32+
borderRadius?: 8 | 12 | 16
3233
/**
3334
* Determines if the modal should close when the user clicks outside of it (on the backdrop).
3435
* @default false

src/Shared/Components/License/DevtronLicenseCard.tsx

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,25 +56,24 @@ const LicenseCardSubText = ({
5656
return (
5757
<div className="p-16 fs-13 lh-1-5 flexbox-col dc__gap-8">
5858
<div className="flexbox dc__gap-8 dc__content-space fs-13 fw-4 lh-20 cn-9">
59-
{freemiumLimitReached ? (
60-
<div className="flexbox-col dc__gap-4">
61-
<span className="fw-6">Multiple Clusters Detected</span>
62-
<span>
63-
Your account is connected to multiple clusters, which isn’t allowed on the freemium
64-
plan. Upgrade to an Enterprise license or contact us.
65-
</span>
66-
</div>
67-
) : (
68-
<span className="fw-6">Unlimited single cluster usage</span>
69-
)}
59+
<div className="flexbox-col dc__gap-4">
60+
<span className="fw-6">
61+
{freemiumLimitReached ? 'Freemium Limit Reached' : 'What’s Included in Freemium'}
62+
</span>
63+
<span>
64+
{freemiumLimitReached
65+
? 'You’ve connected more than 2 clusters, which isn’t supported on the freemium plan. Contact Support to unlock your access or upgrade to Enterprise plan.'
66+
: 'Freemium plan allows managing the Devtron host cluster along with one additional cluster.'}
67+
</span>
68+
</div>
7069
<Icon
7170
name={freemiumLimitReached ? 'ic-error' : 'ic-success'}
7271
color={freemiumLimitReached ? 'R500' : 'G500'}
7372
size={20}
7473
/>
7574
</div>
7675
{freemiumLimitReached && (
77-
<>
76+
<div className="flexbox-col dc__gap-4">
7877
<div className="mail-support">
7978
<Button
8079
dataTestId="mail-support"
@@ -86,7 +85,7 @@ const LicenseCardSubText = ({
8685
/>
8786
</div>
8887
<ContactSupportButton />
89-
</>
88+
</div>
9089
)}
9190
</div>
9291
)

0 commit comments

Comments
 (0)