File tree Expand file tree Collapse file tree 2 files changed +14
-15
lines changed
src/components/Staking/StakingConsiderations Expand file tree Collapse file tree 2 files changed +14
-15
lines changed Original file line number Diff line number Diff line change 11import React from "react"
22import {
33 Box ,
4- chakra ,
54 Flex ,
65 Heading ,
7- Hide ,
86 List ,
97 ListItem ,
108 Text ,
@@ -78,7 +76,6 @@ const StakingConsiderations: React.FC<IProps> = ({ page }) => {
7876 dropdownLinks,
7977 handleSelection,
8078 indicatorSvgStyle,
81- selectionSvgStyle,
8279 title,
8380 valid,
8481 warning,
@@ -137,7 +134,7 @@ const StakingConsiderations: React.FC<IProps> = ({ page }) => {
137134 minH = "410px"
138135 p = { 6 }
139136 >
140- < StyledSvg style = { selectionSvgStyle } />
137+ < StyledSvg />
141138 < Heading
142139 as = "h3"
143140 fontWeight = { 700 }
Original file line number Diff line number Diff line change 11import { useState } from "react"
2- import styled from "@emotion/styled"
32import { useTranslation } from "gatsby-plugin-react-i18next"
43// SVG imports
54import {
@@ -18,6 +17,7 @@ import {
1817import { List as ButtonDropdownList } from "../../ButtonDropdown"
1918import { MatomoEventOptions } from "../../../utils/matomo"
2019import { IProps } from "."
20+ import { chakra } from "@chakra-ui/react"
2121
2222type DataType = {
2323 title : string
@@ -398,17 +398,20 @@ export const useStakingConsiderations = ({ page }: IProps) => {
398398 setActiveIndex ( idx )
399399 }
400400
401- const selectionSvgStyle = { width : 72 , height : "auto" }
402401 const indicatorSvgStyle = { width : 20 , height : "auto" }
403402 const StyledSvg = ! ! Svg
404- ? styled ( Svg ) `
405- path {
406- fill: ${ ( { theme } ) => theme . colors . text } ;
407- }
408- `
409- : styled . div `
410- display: none;
411- `
403+ ? chakra ( Svg , {
404+ baseStyle : {
405+ path : {
406+ fill : "text" ,
407+ } ,
408+ } ,
409+ } )
410+ : chakra ( "div" , {
411+ baseStyle : {
412+ display : "none" ,
413+ } ,
414+ } )
412415
413416 return {
414417 title,
@@ -418,7 +421,6 @@ export const useStakingConsiderations = ({ page }: IProps) => {
418421 warning,
419422 dropdownLinks,
420423 handleSelection,
421- selectionSvgStyle,
422424 indicatorSvgStyle,
423425 StyledSvg,
424426 pageData,
You can’t perform that action at this time.
0 commit comments