-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve styles for the dApp #73
Merged
+162
−86
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
08b4f01
Add a custom theme for `Card`
kkosiorowska 654d9d3
Update a theme for `Switch`
kkosiorowska 305cc41
Update styles for buttons
kkosiorowska dbb6bcc
Minor UI improvements
kkosiorowska a1b3686
Add a custom theme for `Tooltip`
kkosiorowska e6976e9
Merge branch 'main' of github.com:thesis/acre into improve-styles-dapp
kkosiorowska 50adea6
Update a comments
kkosiorowska f799e59
Remove unnecessary logic for the tooltip
kkosiorowska fbf0332
Define a new color
kkosiorowska 442c891
Set the correct size for Acre logo
kkosiorowska c8d9e39
Define a color scheme - `error`
kkosiorowska f224352
Update the color structure
kkosiorowska 14f8ffd
Merge branch 'main' into improve-styles-dapp
kkosiorowska File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from "react" | ||
import { createIcon } from "@chakra-ui/react" | ||
|
||
export const ArrowUpRight = createIcon({ | ||
displayName: "ArrowUpRight", | ||
viewBox: "0 0 16 17", | ||
path: ( | ||
<path | ||
d="M4.66602 11.8346L11.3327 5.16797M11.3327 5.16797H4.66602M11.3327 5.16797V11.8346" | ||
stroke="currentcolor" | ||
strokeWidth="1.5" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
/> | ||
), | ||
}) |
This file was deleted.
Oops, something went wrong.
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,5 +1,5 @@ | ||
export * from "./Info" | ||
export * from "./Bitcoin" | ||
export * from "./Ethereum" | ||
export * from "./ChevronRight" | ||
export * from "./ArrowUpRight" | ||
export * from "./AcreLogo" |
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,15 @@ | ||
import { ComponentSingleStyleConfig } from "@chakra-ui/react" | ||
|
||
const Card: ComponentSingleStyleConfig = { | ||
baseStyle: { | ||
container: { | ||
boxShadow: "none", | ||
borderWidth: "2px", | ||
borderColor: "gold.100", | ||
borderRadius: "xl", | ||
bg: "gold.200", | ||
}, | ||
}, | ||
} | ||
|
||
export default Card |
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,25 @@ | ||
import { | ||
ComponentSingleStyleConfig, | ||
Tooltip as ChakraTooltip, | ||
cssVar, | ||
} from "@chakra-ui/react" | ||
|
||
// Currently, there is no possibility to set all tooltips with hasArrow by | ||
// defaultProps. Let's override the defaultProps as follows. | ||
ChakraTooltip.defaultProps = { ...ChakraTooltip.defaultProps, hasArrow: true } | ||
|
||
// To make the arrow the same color as the background, the css variable needs to | ||
// be set correctly. | ||
// More info: | ||
// https://github.com/chakra-ui/chakra-ui/issues/4695#issuecomment-991023319 | ||
const $arrowBg = cssVar("popper-arrow-bg") | ||
|
||
const Tooltip: ComponentSingleStyleConfig = { | ||
baseStyle: { | ||
borderRadius: "md", | ||
bg: "grey.700", | ||
[$arrowBg.variable]: "colors.grey.700", | ||
}, | ||
} | ||
|
||
export default Tooltip |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to make sure - shouldn't we override the
_hover
(and maybe_active
) state?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're probably right. But at the moment we don't have a style guide. I left a comment there for us to edit the styles when the guide is ready.