diff --git a/src/components/Dashboard/Menu/Options.tsx b/src/components/Dashboard/Menu/Options.tsx index 64bb4ca9..f6ef7380 100644 --- a/src/components/Dashboard/Menu/Options.tsx +++ b/src/components/Dashboard/Menu/Options.tsx @@ -1,4 +1,4 @@ -import { Box, Collapse } from '@chakra-ui/react' +import { Box, Button, Collapse, useDisclosure } from '@chakra-ui/react' import { OrganizationName } from '@vocdoni/chakra-components' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' @@ -6,6 +6,7 @@ import { HiSquares2X2 } from 'react-icons/hi2' import { IoIosSettings } from 'react-icons/io' import { matchPath, useLocation } from 'react-router-dom' import { Routes } from '~src/router/routes' +import { PricingModal } from '../PricingModal' import { DashboardMenuItem } from './Item' type MenuItem = { @@ -19,6 +20,7 @@ export const DashboardMenuOptions = () => { const { t } = useTranslation() const location = useLocation() const [openSection, setOpenSection] = useState(null) + const { isOpen, onOpen, onClose } = useDisclosure() const menuItems: MenuItem[] = [ // { @@ -82,6 +84,8 @@ export const DashboardMenuOptions = () => { return ( + + {menuItems.map((item, index) => ( diff --git a/src/components/Dashboard/PricingModal.tsx b/src/components/Dashboard/PricingModal.tsx index 4bde8acf..d948d659 100644 --- a/src/components/Dashboard/PricingModal.tsx +++ b/src/components/Dashboard/PricingModal.tsx @@ -82,13 +82,13 @@ export const PricingModal = ({ isOpenModal, onCloseModal }: { isOpenModal: boole }, ] return ( - + You need to upgrade to use this feature - + {cards.map((card, idx) => ( @@ -115,7 +115,7 @@ export const PricingModal = ({ isOpenModal, onCloseModal }: { isOpenModal: boole Need some help? - diff --git a/src/components/Organization/Dashboard/PricingCard.tsx b/src/components/Organization/Dashboard/PricingCard.tsx index c6f83de3..ca4a2ffb 100644 --- a/src/components/Organization/Dashboard/PricingCard.tsx +++ b/src/components/Organization/Dashboard/PricingCard.tsx @@ -15,52 +15,57 @@ const PricingCard = ({ width?: string popular?: boolean features: string[] -}) => ( - - - {title} - {subtitle} - - - - - From ${price}/year - - - - {features.map((feature, idx) => ( - {feature} - ))} - - - - - - - {popular && ( - - Most popular plan - - )} - -) +}) => { + return ( + + + {title} + {subtitle} + + + + + + From ${price}/year + + + + + {features.map((feature, idx) => ( + + {feature} + + ))} + + + + + + + {popular && ( + + Most popular plan + + )} + + ) +} export default PricingCard diff --git a/src/i18n/locales/ca.json b/src/i18n/locales/ca.json index ad98d4ea..d5363771 100644 --- a/src/i18n/locales/ca.json +++ b/src/i18n/locales/ca.json @@ -831,7 +831,7 @@ }, "password": "Contrasenya", "pricing_card": { - "from": "From ${price}/year", + "from": "Des de {{price}}/any", "most_popular_plan": "Most popular plan", "view_features": "View all features" }, diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 9e352380..101ce287 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -822,7 +822,7 @@ }, "password": "Password", "pricing_card": { - "from": "From ${price}/year", + "from": "From ${{ price }}/year", "most_popular_plan": "Most popular plan", "view_features": "View all features" }, diff --git a/src/i18n/locales/es.json b/src/i18n/locales/es.json index 8f80f42d..dd5941fe 100644 --- a/src/i18n/locales/es.json +++ b/src/i18n/locales/es.json @@ -831,7 +831,7 @@ }, "password": "Contraseña", "pricing_card": { - "from": "From ${price}/year", + "from": "Desde {{price}}/año", "most_popular_plan": "Most popular plan", "view_features": "View all features" }, diff --git a/src/theme/colors.ts b/src/theme/colors.ts index 5ca24ba8..8f4fe413 100644 --- a/src/theme/colors.ts +++ b/src/theme/colors.ts @@ -1,4 +1,5 @@ export const colorsBase = { + beige: '#D2CBB9', black: '#000000', blue: { normal: '#3965FF', @@ -241,6 +242,28 @@ export const colors = { text_secondary: colorsBase.gray.normal, question_index: colorsBase.primary, }, + pricing_card: { + bg: { + light: colorsBase.white.pure, + dark: colorsBase.blue.grayish, + }, + border_dark: colorsBase.white.pure, + body_text: colorsBase.black, + most_popular_plan: { + bg: colorsBase.beige, + color: colorsBase.black, + }, + subtitle: { + light: colorsBase.gray.normal, + dark: colorsBase.gray.light, + }, + }, + pricing_modal: { + bg: { + light: colorsBase.primary, + dark: colorsBase.blue.dark, + }, + }, process_view: { bg_light: colorsBase.white.dark, bg_dark: colorsBase.blue.dark, diff --git a/src/theme/components/card.ts b/src/theme/components/card.ts index 3fbf7fd0..d129503c 100644 --- a/src/theme/components/card.ts +++ b/src/theme/components/card.ts @@ -44,16 +44,22 @@ export const Card = defineMultiStyleConfig({ 'pricing-card': { container: { position: 'relative', - bgColor: 'white', + borderRadius: 'xl', + bgColor: 'pricing_card.bg.light', minW: { base: '80%', sm: 72 }, w: { base: '80%', sm: 72 }, + _dark: { + bgColor: 'pricing_card.bg.dark', + border: '0.1px solid', + borderColor: 'pricing_card.border_dark', + }, }, header: { pb: 0, minH: 28, '& > p:first-of-type': { pt: 1.5, - color: 'black', + textAlign: 'center', fontWeight: 'bold', mb: 2.5, @@ -63,12 +69,23 @@ export const Card = defineMultiStyleConfig({ fontSize: 'sm', textAlign: 'center', lineHeight: 1.2, - color: 'gray.400', + color: 'pricing_card.subtitle.light', + + _dark: { + color: 'pricing_card.subtitle.dark', + }, }, }, body: { + display: 'flex', + flexDirection: 'column', + justifyContent: 'center', + pt: 0, '& > button': { - mb: 4, + mx: 'auto', + mt: 3, + mb: 2, + w: 'full', }, '& > p:first-of-type': { fontWeight: 'extrabold', @@ -78,10 +95,12 @@ export const Card = defineMultiStyleConfig({ }, '& > div:last-of-type': { ml: 3, + '& > ul': { maxW: 'fit-content', mx: 'auto', fontSize: 'sm', + listStyleType: '"- "', }, }, }, @@ -90,7 +109,7 @@ export const Card = defineMultiStyleConfig({ justifyContent: 'center', '& button': { - color: 'prcing_card_btn', + color: 'pricing_card_btn', }, }, }, diff --git a/src/theme/components/modal.ts b/src/theme/components/modal.ts index 32f1c00a..29dd5c45 100644 --- a/src/theme/components/modal.ts +++ b/src/theme/components/modal.ts @@ -13,11 +13,7 @@ export const Modal = defineMultiStyleConfig({ }, }, variants: { - 'dashboard-plans': { - dialogContainer: { - minW: '100vw', - minH: '100vh', - }, + 'pricing-modal': { dialog: { borderRadius: 0, m: 0, @@ -25,9 +21,11 @@ export const Modal = defineMultiStyleConfig({ base: 2.5, sm: 5, }, - minW: '100vw', - minH: '100vh', - bgColor: '#546E39', + + bgColor: 'pricing_modal.bg.light', + _dark: { + bgColor: 'pricing_modal.bg.dark', + }, }, header: { pt: 12,