-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
173 changed files
with
732 additions
and
751 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "ethereum-org-website", | ||
"version": "5.4.0", | ||
"version": "6.0.0", | ||
"description": "Website of ethereum.org", | ||
"main": "index.js", | ||
"repository": "[email protected]:ethereum/ethereum-org-website.git", | ||
|
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,74 @@ | ||
import type { ComponentStyleConfig } from "@chakra-ui/theme" | ||
|
||
const commonOutline = { | ||
border: "1px", | ||
color: "text", | ||
bg: "transparent", | ||
borderColor: "text", | ||
_hover: { | ||
color: "primary", | ||
bg: "background", | ||
borderColor: "primary", | ||
}, | ||
_active: { | ||
color: "primary", | ||
bg: "primaryLight", | ||
borderColor: "primary", | ||
}, | ||
_focus: { | ||
color: "primary", | ||
borderColor: "background", | ||
}, | ||
_disabled: { | ||
color: "disabled", | ||
borderColor: "disabled", | ||
opacity: 1, | ||
}, | ||
} | ||
|
||
export const Button: ComponentStyleConfig = { | ||
baseStyle: { | ||
fontWeight: "normal", | ||
borderRadius: "base", | ||
_hover: { | ||
textDecoration: "none", | ||
boxShadow: "primary", | ||
}, | ||
_focus: { | ||
boxShadow: "outline", | ||
outline: 0, | ||
}, | ||
}, | ||
sizes: { | ||
md: { | ||
h: 42, | ||
}, | ||
}, | ||
variants: { | ||
// solid is the default variant used by chakra | ||
solid: { | ||
color: "buttonColor", | ||
bg: "primary", | ||
border: 0, | ||
_hover: { | ||
bg: "primary", | ||
opacity: 0.8, | ||
}, | ||
_active: { | ||
bg: "primaryHover", | ||
}, | ||
_disabled: { | ||
bg: "disabled", | ||
opacity: 1, | ||
}, | ||
}, | ||
outline: { | ||
...commonOutline, | ||
}, | ||
"outline-color": { | ||
...commonOutline, | ||
color: "primary", | ||
borderColor: "primary", | ||
}, | ||
}, | ||
} |
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 type { ComponentStyleConfig } from "@chakra-ui/theme" | ||
|
||
export const Link: ComponentStyleConfig = { | ||
baseStyle: { | ||
color: "primary", | ||
textDecoration: "underline", | ||
_focus: { | ||
boxShadow: "none", | ||
}, | ||
_focusVisible: { | ||
boxShadow: "none", | ||
outline: "auto", | ||
}, | ||
}, | ||
} |
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,2 @@ | ||
export * from "./Link" | ||
export * from "./Button" |
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,7 +1,11 @@ | ||
import colors from "./colors" | ||
import shadows from "./shadows" | ||
|
||
// Check the following link to see all the possible options: | ||
// https://github.com/chakra-ui/chakra-ui/blob/main/packages/theme/src/foundations/index.ts | ||
const foundations = { | ||
colors, | ||
shadows, | ||
} | ||
|
||
export default foundations |
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 @@ | ||
const shadows = { | ||
// using css variables bc shadows do not support color tokens yet | ||
primary: "4px 4px 0px 0px var(--eth-colors-primaryLight)", | ||
outline: "0 0 0 4px var(--eth-colors-primaryHover)", | ||
} | ||
|
||
export default shadows |
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,26 @@ | ||
import React from "react" | ||
import { Button as ChakraButton, ButtonProps } from "@chakra-ui/react" | ||
|
||
import { scrollIntoView } from "../utils/scrollIntoView" | ||
|
||
export interface IProps extends ButtonProps { | ||
toId?: string | ||
} | ||
|
||
const Button: React.FC<IProps> = ({ toId, children, ...props }) => { | ||
const handleOnClick = () => { | ||
if (!toId) { | ||
return | ||
} | ||
|
||
scrollIntoView(toId) | ||
} | ||
|
||
return ( | ||
<ChakraButton onClick={handleOnClick} {...props}> | ||
{children} | ||
</ChakraButton> | ||
) | ||
} | ||
|
||
export default Button |
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.