From 89647d45dbec4f8d83a30a7c7b6f73ba31c3bc38 Mon Sep 17 00:00:00 2001 From: titix Date: Tue, 23 Apr 2024 23:41:08 -0300 Subject: [PATCH] fix: text style --- .../ProposalCard/ProposalDetail.tsx | 6 ++++- src/containers/ProposalCard/ProposalPoll.tsx | 24 ++++++++++++++--- .../ProposalCard/ProposalStatus.tsx | 26 ++++++++++++------- 3 files changed, 41 insertions(+), 15 deletions(-) diff --git a/src/containers/ProposalCard/ProposalDetail.tsx b/src/containers/ProposalCard/ProposalDetail.tsx index 6dd347e..f90b6a2 100644 --- a/src/containers/ProposalCard/ProposalDetail.tsx +++ b/src/containers/ProposalCard/ProposalDetail.tsx @@ -17,7 +17,7 @@ export const ProposalDetail = () => { return ( - Proposal + Proposal @@ -111,3 +111,7 @@ const CodeSnippet = styled(Typography)(() => { const SParagraph = styled(Typography)({ textAlign: 'justify', }); + +const STitle = styled(Typography)({ + fontWeight: 800, +}); diff --git a/src/containers/ProposalCard/ProposalPoll.tsx b/src/containers/ProposalCard/ProposalPoll.tsx index 7db9f13..29b5317 100644 --- a/src/containers/ProposalCard/ProposalPoll.tsx +++ b/src/containers/ProposalCard/ProposalPoll.tsx @@ -56,7 +56,7 @@ export const ProposalPoll = () => { return ( - Current Votes + Current Votes @@ -64,14 +64,14 @@ export const ProposalPoll = () => { Quorum - {quorum} + {quorum} Majority support - {majoritySupport} + {majoritySupport} {voteOffsets.map((vote, index) => ( @@ -83,7 +83,7 @@ export const ProposalPoll = () => { {vote.type} - {vote.count} + {vote.count} ))} @@ -103,6 +103,7 @@ const PollContainer = styled(Box)(() => { padding: '2rem', boxShadow: '0 4px 8px rgba(0,0,0,0.1)', gap: '0.5rem', + fontWeight: 800, }; }); @@ -140,6 +141,21 @@ const SBox = styled(Box)({ padding: '4px', }); +const STitle = styled(Typography)({ + fontWeight: 800, +}); + +const SText = styled(Typography)(() => { + const { currentTheme } = useCustomTheme(); + return { + fontWeight: 800, + color: currentTheme.textSecondary, + '@media (max-width: 1200px)': { + fontSize: '0.75rem', + }, + }; +}); + const StyledTypography = styled(Typography)(({ color }) => ({ color: color, marginRight: 'auto', diff --git a/src/containers/ProposalCard/ProposalStatus.tsx b/src/containers/ProposalCard/ProposalStatus.tsx index 8071708..ef6e6d0 100644 --- a/src/containers/ProposalCard/ProposalStatus.tsx +++ b/src/containers/ProposalCard/ProposalStatus.tsx @@ -9,8 +9,6 @@ import { useCustomTheme } from '~/hooks'; import { MoreButton } from '~/components'; export const ProposalStatus = () => { - const { currentTheme } = useCustomTheme(); - const handleExplorer = (url: string) => { //navigate to block scan if (typeof window !== 'undefined') { @@ -22,13 +20,13 @@ export const ProposalStatus = () => { { icon: , primary: 'Draft created', - secondary: 'Wed Apr 3, 02:50 pm - cattin.seedlatam.eth', + secondary: 'Wed Apr 3, 02:50 pm', state: 'done', }, { icon: , primary: 'Published onchain', - secondary: 'Wed Apr 3, 02:50 pm - cattin.seedlatam.eth', + secondary: 'Wed Apr 3, 02:50 pm', state: 'active', menuItems: [ { label: 'View on block explorer', onClick: () => handleExplorer('https://optimistic.etherscan.io/') }, @@ -37,7 +35,7 @@ export const ProposalStatus = () => { { icon: , primary: 'Voting period started', - secondary: 'Sat Apr 6, 03:22 pm - cattin.seedlatam.eth', + secondary: 'Sat Apr 6, 03:22 pm', state: 'pending', menuItems: [ { label: 'View on block explorer', onClick: () => handleExplorer('https://optimistic.etherscan.io/') }, @@ -61,9 +59,9 @@ export const ProposalStatus = () => { return ( - - Status - + + Status + {statusItems.map((item, index) => ( @@ -87,8 +85,8 @@ const StatusContainer = styled(Box)(() => { backgroundColor: currentTheme.backgroundSecondary, borderRadius: currentTheme.borderRadius, boxShadow: currentTheme.boxShadow, - padding: '1rem', - margin: '0 0 2rem 0', + margin: '0 0 1rem 0', + padding: '2rem', }; }); @@ -118,3 +116,11 @@ const StatusListItem = styled(ListItem)(() => { }, }; }); + +const TitleContainer = styled(Box)({ + paddingBottom: '0.5rem', +}); + +const STitle = styled(Typography)({ + fontWeight: 800, +});