Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Custom theme override #22

Merged
merged 7 commits into from
Nov 3, 2020
Merged

Conversation

anxolin
Copy link
Contributor

@anxolin anxolin commented Nov 3, 2020

This PR overrides the theme and restore the original files so we have less conflicts when we update

custom/index.tsx will allow us to:

  • colors function: Define our own colors. Inherits from the default Uniswap colors, adds the colors added on Customize theme #8
  • theme function: Define our own theme snippets. See how I addressed the DRY issue for the linear-gradient raised in Customize theme #8 . Inherits from the default Uniswap theme. This is applied in Button/index.tsx
  • FixedGlobalStyle: inherit from Uniswap global styles, and can redefine global styles
  • ThemedGlobalStyle: inherit from Uniswap global styles, and can redefine global styles. I applied here the changes from Customize theme #8. Note that it adds a TODO of something I think is an error, but not part of this PR (comes from Customize theme #8 too)

@@ -22,20 +22,20 @@ import {

export const ButtonPrimary = styled(ButtonPrimaryMod)`
// CSS overrides
${({ theme }) => theme.linearGradient}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't quite obvious that linearGradient = 'background-image:...', maybe call it bckImageGradient
Or use like background-image: ${({ theme }) => theme.linearGradient}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, will do

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anxolin anxolin changed the base branch from import-them-as-global to custom-theme-michel November 3, 2020 11:08
@anxolin anxolin merged commit 4a533b9 into custom-theme-michel Nov 3, 2020
anxolin added a commit that referenced this pull request Nov 3, 2020
* Add modified header

* Add header modification

* Override logos

* Leave header placeholder

* Create type WithClasss

* Make header styled component compatible

* Remove relative path

* Override body

* Adding custom bg colors.

* Override and re-style CurrencyInputPanel

* Adding custom colors Currency Panel

* Fix style not applying

* Adding custom colors Currency Panel

* Add currency select logic

* Adding custom button gradient color.

* Adding custom button component.

* Fix buttons

* Adding custom button component styles.

* Add light mode advancedBG color.

* Import theme as global (#21)

* Custom theme override (#22)

* Import theme as global

* Override theme

* Use linear gradient

* Add message to reviewers

* Fix issue witht he gradient

* Rename linear background

Co-authored-by: Anxo Rodriguez <[email protected]>
Co-authored-by: Michel Bio <[email protected]>
@anxolin anxolin mentioned this pull request Nov 3, 2020
@anxolin anxolin deleted the custom-theme-override branch July 2, 2021 13:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants