Skip to content

Commit 9c94602

Browse files
authored
Merge branch 'dev' into feat/convert-Callout-Chakra
2 parents 010f684 + 1f827e7 commit 9c94602

File tree

121 files changed

+4640
-2353
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+4640
-2353
lines changed

.all-contributorsrc

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8649,6 +8649,54 @@
86498649
"doc",
86508650
"bug"
86518651
]
8652+
},
8653+
{
8654+
"login": "Batxent",
8655+
"name": "tommy",
8656+
"avatar_url": "https://avatars.githubusercontent.com/u/7824431?v=4",
8657+
"profile": "https://github.com/Batxent",
8658+
"contributions": [
8659+
"doc",
8660+
"translation"
8661+
]
8662+
},
8663+
{
8664+
"login": "martinyung",
8665+
"name": "Martin Yung",
8666+
"avatar_url": "https://avatars.githubusercontent.com/u/8136256?v=4",
8667+
"profile": "https://medium.com/@martinyce",
8668+
"contributions": [
8669+
"code",
8670+
"translation"
8671+
]
8672+
},
8673+
{
8674+
"login": "pankajjagtapp",
8675+
"name": "Pankaj Jagtap",
8676+
"avatar_url": "https://avatars.githubusercontent.com/u/89507661?v=4",
8677+
"profile": "https://github.com/pankajjagtapp",
8678+
"contributions": [
8679+
"doc"
8680+
]
8681+
},
8682+
{
8683+
"login": "hannsu",
8684+
"name": "nulun",
8685+
"avatar_url": "https://avatars.githubusercontent.com/u/20453231?v=4",
8686+
"profile": "https://github.com/hannsu",
8687+
"contributions": [
8688+
"code"
8689+
]
8690+
},
8691+
{
8692+
"login": "Denllay",
8693+
"name": "Denllay",
8694+
"avatar_url": "https://avatars.githubusercontent.com/u/75447714?v=4",
8695+
"profile": "https://github.com/Denllay",
8696+
"contributions": [
8697+
"doc",
8698+
"translation"
8699+
]
86528700
}
86538701
],
86548702
"contributorsPerLine": 7,

README.md

Lines changed: 1202 additions & 1193 deletions
Large diffs are not rendered by default.

overrides.d.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
// temporary override until we figure out how to solve the `getImage` type
2-
// error. https://github.com/gatsbyjs/gatsby/issues/35748
3-
declare module "gatsby-plugin-image"
4-
51
declare module "*developer-docs-links.yaml" {
62
import { DeveloperDocsLink } from "./src/types"
73
const content: Array<DeveloperDocsLink>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import type { ComponentStyleConfig } from "@chakra-ui/theme"
2+
3+
export const Tag: ComponentStyleConfig = {
4+
baseStyle: {
5+
container: {
6+
display: "flex",
7+
alignItems: "center",
8+
bgImage:
9+
"radial-gradient(46.28% 66.31% at 66.95% 58.35%,rgba(127, 127, 213, 0.2) 0%,rgba(134, 168, 231, 0.2) 50%,rgba(145, 234, 228, 0.2) 100%)",
10+
mb: 2,
11+
mr: 2,
12+
p: 2,
13+
borderRadius: "base",
14+
textTransform: "uppercase",
15+
fontSize: "sm",
16+
fontWeight: "normal",
17+
boxShadow: "table",
18+
border: "1px solid",
19+
borderColor: "white800",
20+
cursor: "pointer",
21+
opacity: "0.7",
22+
color: "text",
23+
_hover: {
24+
color: "primary",
25+
borderColor: "text200",
26+
opacity: "1",
27+
},
28+
},
29+
},
30+
variants: {
31+
active: {
32+
container: {
33+
borderColor: "primary300",
34+
opacity: "1",
35+
boxShadow: "none",
36+
},
37+
},
38+
custom: {}, // empty variant
39+
},
40+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export * from "./Link"
22
export * from "./Button"
3+
export * from "./Tag"

src/@chakra-ui/gatsby-plugin/foundations/shadows.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ const shadows = {
22
// using css variables bc shadows do not support color tokens yet
33
primary: "4px 4px 0px 0px var(--eth-colors-primaryLight)",
44
outline: "0 0 0 4px var(--eth-colors-primaryHover)",
5+
table:
6+
"0 14px 66px rgba(0,0,0,.07), 0 10px 17px rgba(0,0,0,.03), 0 4px 7px rgba(0,0,0,.05)",
57
}
68

79
export default shadows

src/components/ActionCard.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { ReactNode } from "react"
22
import styled from "@emotion/styled"
3-
import { GatsbyImage } from "gatsby-plugin-image"
3+
import { GatsbyImage, IGatsbyImageData } from "gatsby-plugin-image"
44

55
import Link from "./Link"
66

@@ -70,7 +70,7 @@ export interface IProps {
7070
children?: React.ReactNode
7171
to: string
7272
alt?: string
73-
image: string
73+
image: IGatsbyImageData | string
7474
title: ReactNode
7575
description?: ReactNode
7676
className?: string
@@ -89,15 +89,16 @@ const ActionCard: React.FC<IProps> = ({
8989
isRight,
9090
isBottom = true,
9191
}) => {
92-
const isImageURL = typeof image === "string" && image.includes("http")
92+
const isImageURL = typeof image === "string"
93+
9394
return (
9495
<Card to={to} className={className} hideArrow={true}>
9596
<ImageWrapper
9697
isRight={isRight}
9798
isBottom={isBottom}
9899
className="action-card-image-wrapper"
99100
>
100-
{!isImageURL && <Image image={image} alt={alt} />}
101+
{!isImageURL && <Image image={image} alt={alt || ""} />}
101102
{isImageURL && (
102103
<img src={image} alt={alt} className="action-card-image" />
103104
)}

src/components/AssetDownload.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import React from "react"
22
import styled from "@emotion/styled"
3-
import { GatsbyImage, getImage, getSrc } from "gatsby-plugin-image"
3+
import { GatsbyImage } from "gatsby-plugin-image"
44

55
import Translation from "../components/Translation"
66
import ButtonLink from "./ButtonLink"
77
import Emoji from "./OldEmoji"
88
import Link from "./Link"
99

10+
import { getImage, getSrc, ImageDataLike } from "../utils/image"
11+
1012
export interface IHide {
1113
shouldHide: boolean
1214
}
@@ -27,7 +29,7 @@ interface IPropsWithSVG extends IPropsBase {
2729
}
2830
interface IPropsWithImage extends IPropsBase {
2931
svg?: never
30-
image: any
32+
image: ImageDataLike | null
3133
}
3234

3335
export type IProps = IPropsWithImage | IPropsWithSVG
@@ -95,7 +97,7 @@ const AssetDownload: React.FC<IProps> = ({
9597
svg,
9698
}) => {
9799
const baseUrl = `https://ethereum.org`
98-
const downloadUri = src ? src : getSrc(image)
100+
const downloadUri = src ? src : image ? getSrc(image) : ""
99101
const downloadUrl = `${baseUrl}${downloadUri}`
100102
const Svg = svg
101103

@@ -106,11 +108,8 @@ const AssetDownload: React.FC<IProps> = ({
106108
{children && <ImageContainer>{children}</ImageContainer>}
107109
{!children && (
108110
<ImageContainer>
109-
{Svg ? (
110-
<Svg alt={alt} />
111-
) : (
112-
<Image image={getImage(image)} alt={alt} />
113-
)}
111+
{Svg && <Svg alt={alt} />}
112+
{image && <Image image={getImage(image)!} alt={alt} />}
114113
</ImageContainer>
115114
)}
116115
{artistName && (

src/components/BeaconChainActions.tsx

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React from "react"
22
import { useStaticQuery, graphql } from "gatsby"
3-
import { getImage } from "gatsby-plugin-image"
43
import styled from "@emotion/styled"
54
import { useIntl } from "react-intl"
65

76
import { translateMessageId } from "../utils/translations"
7+
import { getImage, ImageDataLike } from "../utils/image"
88

99
import CardList from "./CardList"
1010
import Card from "./Card"
@@ -71,12 +71,6 @@ export const DataLogo = graphql`
7171
}
7272
`
7373

74-
type ChildImage = {
75-
childImageSharp: {
76-
gatsbyImageData: Record<string, unknown>
77-
}
78-
}
79-
8074
const BeaconStaticQuery = graphql`
8175
query {
8276
beaconscan: file(relativePath: { eq: "upgrades/etherscan.png" }) {
@@ -89,8 +83,8 @@ const BeaconStaticQuery = graphql`
8983
`
9084

9185
type BeaconQueryTypes = {
92-
beaconscan: ChildImage
93-
beaconchain: ChildImage
86+
beaconscan: ImageDataLike | null
87+
beaconchain: ImageDataLike | null
9488
}
9589

9690
const BeaconChainActions: React.FC = () => {
@@ -100,14 +94,14 @@ const BeaconChainActions: React.FC = () => {
10094
const datapoints: Array<CardListItem> = [
10195
{
10296
title: "beaconscan",
103-
image: getImage(data.beaconscan),
97+
image: getImage(data.beaconscan)!,
10498
alt: "",
10599
link: "https://beaconscan.com",
106100
description: translateMessageId("consensus-beaconscan-desc", intl),
107101
},
108102
{
109103
title: "beaconcha.in",
110-
image: getImage(data.beaconchain),
104+
image: getImage(data.beaconchain)!,
111105
alt: "",
112106
link: "https://beaconcha.in",
113107
description: translateMessageId("consensus-beaconcha-in-desc", intl),

src/components/BugBountyPoints.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import React, { useContext, useState, useEffect } from "react"
1+
import React, { useState, useEffect } from "react"
22
import { useTheme } from "@emotion/react"
33
import { useStaticQuery, graphql } from "gatsby"
4-
import { GatsbyImage, getImage } from "gatsby-plugin-image"
4+
import { GatsbyImage } from "gatsby-plugin-image"
55
import styled from "@emotion/styled"
66
import axios from "axios"
77

@@ -11,6 +11,8 @@ import Icon from "./Icon"
1111
import Link from "./Link"
1212
import Tooltip from "./Tooltip"
1313

14+
import { getImage } from "../utils/image"
15+
1416
const PointsExchange = styled.div`
1517
flex: 1 1 560px;
1618
padding: 1.5rem;
@@ -196,11 +198,11 @@ const BugBountyPoints: React.FC<IProps> = () => {
196198
</TokenValue>
197199
</Row>
198200
<Row>
199-
<Token image={getImage(data.dai)} />
201+
<Token image={getImage(data.dai)!} alt="" />
200202
<TokenValue>{pointsInDAI} DAI</TokenValue>
201203
</Row>
202204
<Row>
203-
<Token image={getImage(ethImage)} />
205+
<Token image={getImage(ethImage)!} alt="" />
204206
<TokenValue>{pointsInETH} ETH</TokenValue>
205207
</Row>
206208
</ValueRow>

0 commit comments

Comments
 (0)