Skip to content

Commit 1310ec0

Browse files
authored
Merge pull request #8199 from therealharpaljadeja/chakra-statsloadingmessage
chore: convert statLoadingMessage
2 parents d496f07 + c2b84fa commit 1310ec0

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

src/components/StatErrorMessage.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import React from "react"
2-
import { TypographyProps } from "styled-system"
2+
import { Text, TextProps } from "@chakra-ui/react"
33

44
import Translation from "./Translation"
5-
import { IndicatorSpan } from "./StatLoadingMessage"
65

7-
export interface IProps extends TypographyProps {}
6+
export interface IProps extends TextProps {}
87

98
const StatErrorMessage: React.FC<IProps> = (props) => (
10-
<IndicatorSpan fontSize="2rem" {...props}>
9+
<Text as="span" fontSize="2rem" {...props}>
1110
<Translation id="loading-error-refresh" />
12-
</IndicatorSpan>
11+
</Text>
1312
)
1413

1514
export default StatErrorMessage

src/components/StatLoadingMessage.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
import React from "react"
2-
import styled from "@emotion/styled"
3-
import { typography, TypographyProps } from "styled-system"
2+
import { Text, TextProps } from "@chakra-ui/react"
43

54
import Translation from "./Translation"
65

7-
export interface IProps extends TypographyProps {}
8-
9-
export const IndicatorSpan = styled.span<IProps>`
10-
${typography}
11-
`
6+
export interface IProps extends TextProps {}
127

138
const StatLoadingMessage: React.FC<IProps> = (props) => (
14-
<IndicatorSpan fontSize="2rem" {...props}>
9+
<Text as="span" fontSize="2rem" {...props}>
1510
<Translation id="loading" />
16-
</IndicatorSpan>
11+
</Text>
1712
)
1813

1914
export default StatLoadingMessage

0 commit comments

Comments
 (0)