-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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.
- Loading branch information
1 parent
9ebd6a8
commit 9e98ebe
Showing
16 changed files
with
148 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const DivWithGradient = () => ( | ||
<div className="div-with-gradient" style={{ width: '100%', position: 'absolute', bottom: 0, left: 0 }} /> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
export type ButtonVariants = 'primary' | 'secondary' | 'secondary-full' | 'borderless' | 'outlined' | 'white' | ||
export type ButtonVariants = | ||
| 'primary' | ||
| 'secondary' | ||
| 'secondary-full' | ||
| 'borderless' | ||
| 'outlined' | ||
| 'white' | ||
| 'sidebar-active' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Logo } from '@/components/Header/Logo' | ||
|
||
export const GradientHeader = () => ( | ||
<div className="gradient-header"> | ||
<Logo /> | ||
</div> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,57 @@ | ||
import { Button } from '@/components/Button' | ||
import { SidebarButtonsProps } from '@/components/LeftSidebar/types' | ||
import Image from 'next/image' | ||
|
||
const ImageAsIcon = ({ src, alt }: { src: string; alt: string }) => ( | ||
<Image src={src} alt={alt} width={20} height={20} /> | ||
) | ||
|
||
const DEFAULT_BUTTON_CLASSNAME = 'mb-[32px] pl-11' | ||
|
||
const START_ICON_CLASSES = 'left-[-28px] top-[2px]' | ||
|
||
interface SidebarButtonProps { | ||
text: string | ||
isActive: boolean | ||
onClick?: () => void | ||
buttonProps: { | ||
id: string | ||
name: string | ||
} | ||
} | ||
const SidebarButton = ({ text, onClick, isActive, buttonProps }: SidebarButtonProps) => ( | ||
<Button | ||
fullWidth | ||
centerContent={false} | ||
startIconClasses={START_ICON_CLASSES} | ||
onClick={onClick} | ||
className={DEFAULT_BUTTON_CLASSNAME} | ||
variant={isActive ? 'sidebar-active' : 'borderless'} | ||
buttonProps={buttonProps} | ||
> | ||
{text} | ||
</Button> | ||
) | ||
export const SidebarButtons = ({ onClick, activeButton = 'communities' }: SidebarButtonsProps) => ( | ||
<> | ||
<Button | ||
startIcon={<ImageAsIcon src="/images/sidemenu/user.svg" alt="User" />} | ||
<SidebarButton | ||
onClick={() => onClick?.('user')} | ||
fullWidth | ||
variant={!activeButton || activeButton.startsWith('user') ? 'primary' : 'borderless'} | ||
centerContent={false} | ||
className={DEFAULT_BUTTON_CLASSNAME} | ||
isActive={!activeButton || activeButton.startsWith('user')} | ||
buttonProps={{ id: 'Button_User', name: 'user' }} | ||
startIconClasses={START_ICON_CLASSES} | ||
> | ||
My Collective | ||
</Button> | ||
<Button | ||
startIcon={<ImageAsIcon src="/images/sidemenu/treasury.svg" alt="Treasury" />} | ||
text="My Collective" | ||
/> | ||
<SidebarButton | ||
onClick={() => onClick?.('treasury')} | ||
fullWidth | ||
variant={activeButton.startsWith('treasury') ? 'primary' : 'borderless'} | ||
centerContent={false} | ||
className={DEFAULT_BUTTON_CLASSNAME} | ||
isActive={activeButton.startsWith('treasury')} | ||
buttonProps={{ id: 'Button_Treasury', name: 'treasury' }} | ||
startIconClasses={START_ICON_CLASSES} | ||
> | ||
Treasury | ||
</Button> | ||
<Button | ||
startIcon={<ImageAsIcon src="/images/sidemenu/proposals.svg" alt="Proposals" />} | ||
text="Treasury" | ||
/> | ||
<SidebarButton | ||
onClick={() => onClick?.('proposals')} | ||
fullWidth | ||
variant={activeButton.startsWith('proposals') ? 'primary' : 'borderless'} | ||
centerContent={false} | ||
className={DEFAULT_BUTTON_CLASSNAME} | ||
isActive={activeButton.startsWith('proposals')} | ||
buttonProps={{ id: 'Button_Proposals', name: 'proposals' }} | ||
startIconClasses={START_ICON_CLASSES} | ||
> | ||
Proposals | ||
</Button> | ||
<Button | ||
startIcon={<ImageAsIcon src="/images/sidemenu/communities.svg" alt="Communities" />} | ||
text="Proposals" | ||
/> | ||
<SidebarButton | ||
onClick={() => onClick?.('communities')} | ||
fullWidth | ||
centerContent={false} | ||
className={DEFAULT_BUTTON_CLASSNAME} | ||
isActive={activeButton.startsWith('communities')} | ||
buttonProps={{ id: 'Button_Communities', name: 'communities' }} | ||
variant={activeButton.startsWith('communities') ? 'primary' : 'borderless'} | ||
startIconClasses={START_ICON_CLASSES} | ||
> | ||
Communities | ||
</Button> | ||
text="Communities" | ||
/> | ||
</> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.