From 9e98ebe750825c9a610aeebd3fd0cbee252d5359 Mon Sep 17 00:00:00 2001
From: Francis Rodriguez <39339295+Freshenext@users.noreply.github.com>
Date: Mon, 7 Oct 2024 09:09:46 -0400
Subject: [PATCH] Dao 717 Implemented gradient (#246)
* DAO-710 feat: added HeaderTitle.tsx which is the typography that will be used for section titles.
BREAKING CHANGE: changed background color and foreground color
fix: removed plus icon from create proposal button.
fix: will now use HeaderTitle in the HeaderSection for proposals page
fix: will use HeaderTitle in the proposals page where latest proposals is
fix: edited columns name
fix: edited date output format
feat: edited MetricsCard.tsx to account for new style changes.
fix: My voting power in proposals is not a metric card anymore; this component was created there.
fix: adjusted width of metrics card of proposals created to 272 pixels
fix: camel case my voting power
fix: proposal name column will not wrap, and the text will be white due to new changes in the table design.
BREAKING CHANGE: table header will now contain new style changes.
BREAKING CHANGE: the table will have no rounded borders anymore due to design change.
BREAKING CHANGE: table head color has changed to the foreground per new design changes
fix: exported Typography type so it can be used.
* fix: will now use variant light for span
* DAO-715 fix: metrics card will now use span instead of paragraph to better reflect its purpose for the fiatAmount.
fix: the contractAddress link will have a margin top
fix: MetricsSection.tsx will now use HeaderTitle
fix: TotalTokenHoldingsSection.tsx will now use HeaderTitle
fix: TreasurySection.tsx will use HeaderTitle. The metrics card will be borderless to reflect new design changes.
* DAO-717
feat: added new button variant (sidebar-active)
feat: added new component DivWithGradient.tsx
feat: added gradient classes in the globals.css
feat: added GradientHeader.tsx
fix: removed classes from Header as design changes required it.
fix: the sidebar will now have the ConnectedComponent prop which will be used to render that component.
feat: added gradient header to sidebar
feat: added gradient border to sidebar buttons
fix: useful links added padding left
feat: created SidebarButton component to implement DRY.
---
src/app/globals.css | 21 +++++
src/app/treasury/MetricsSection.tsx | 4 +-
.../treasury/TotalTokenHoldingsSection.tsx | 4 +-
src/app/treasury/TreasurySection.tsx | 8 +-
src/components/Button/Button.tsx | 2 +
src/components/Button/DivWithGradient.tsx | 3 +
src/components/Button/types.ts | 9 +-
.../GradientHeader/GradientHeader.tsx | 7 ++
src/components/Header/Header.tsx | 2 +-
src/components/LeftSidebar/LeftSidebar.tsx | 15 ++--
src/components/LeftSidebar/SidebarButtons.tsx | 83 +++++++++----------
src/components/LeftSidebar/UsefulLinks.tsx | 2 +-
src/components/LeftSidebar/types.ts | 3 +
.../MainContainer/MainContainer.tsx | 59 +++++++------
.../MainContainer/StatefulSidebar.tsx | 14 +++-
src/components/MetricsCard/MetricsCard.tsx | 10 +--
16 files changed, 148 insertions(+), 98 deletions(-)
create mode 100644 src/components/Button/DivWithGradient.tsx
create mode 100644 src/components/GradientHeader/GradientHeader.tsx
diff --git a/src/app/globals.css b/src/app/globals.css
index 7bf3cd58..673ed112 100644
--- a/src/app/globals.css
+++ b/src/app/globals.css
@@ -8,6 +8,27 @@
.underline-thick {
text-decoration-thickness: 0.5px;
}
+
+ div.div-with-gradient::after {
+ background: linear-gradient(270deg, #FFFEE3 -30.96%, #F9E1FF 43.65%, #BE5B0F 77.22%, #932309 110.79%, #010101 155.56%);
+ content: "";
+ width: 100%;
+ height: 1px;
+ display: block;
+ position: absolute;
+ top: 0;
+ left: 0;
+ }
+
+ .gradient-header {
+ background: linear-gradient(270deg, #FFFEE3 -30.96%, #F9E1FF 43.65%, #BE5B0F 77.22%, #932309 110.79%, #010101 155.56%);
+ width: 100%;
+ height: 48px;
+ display: flex;
+ align-items: center;
+ padding-left: 25px;
+ }
+
}
* {
diff --git a/src/app/treasury/MetricsSection.tsx b/src/app/treasury/MetricsSection.tsx
index d277cafc..023bbae3 100644
--- a/src/app/treasury/MetricsSection.tsx
+++ b/src/app/treasury/MetricsSection.tsx
@@ -1,4 +1,4 @@
-import { Paragraph } from '@/components/Typography'
+import { HeaderTitle } from '@/components/Typography'
import { Table } from '@/components/Table'
import { TokenHoldingsStRIF } from '@/app/treasury/TokenHoldingsStRIF'
@@ -12,7 +12,7 @@ const tableData = [
]
export const MetricsSection = () => (