Skip to content

Commit

Permalink
Merge pull request #8199 from therealharpaljadeja/chakra-statsloading…
Browse files Browse the repository at this point in the history
…message

chore: convert statLoadingMessage
  • Loading branch information
pettinarip authored Jan 25, 2023
2 parents d496f07 + c2b84fa commit 1310ec0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
9 changes: 4 additions & 5 deletions src/components/StatErrorMessage.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import React from "react"
import { TypographyProps } from "styled-system"
import { Text, TextProps } from "@chakra-ui/react"

import Translation from "./Translation"
import { IndicatorSpan } from "./StatLoadingMessage"

export interface IProps extends TypographyProps {}
export interface IProps extends TextProps {}

const StatErrorMessage: React.FC<IProps> = (props) => (
<IndicatorSpan fontSize="2rem" {...props}>
<Text as="span" fontSize="2rem" {...props}>
<Translation id="loading-error-refresh" />
</IndicatorSpan>
</Text>
)

export default StatErrorMessage
13 changes: 4 additions & 9 deletions src/components/StatLoadingMessage.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
import React from "react"
import styled from "@emotion/styled"
import { typography, TypographyProps } from "styled-system"
import { Text, TextProps } from "@chakra-ui/react"

import Translation from "./Translation"

export interface IProps extends TypographyProps {}

export const IndicatorSpan = styled.span<IProps>`
${typography}
`
export interface IProps extends TextProps {}

const StatLoadingMessage: React.FC<IProps> = (props) => (
<IndicatorSpan fontSize="2rem" {...props}>
<Text as="span" fontSize="2rem" {...props}>
<Translation id="loading" />
</IndicatorSpan>
</Text>
)

export default StatLoadingMessage

0 comments on commit 1310ec0

Please sign in to comment.