@@ -4,11 +4,16 @@ import { styled } from '@mui/material/styles';
44import Toggle from '@root/src/pages/sidepanel/components/Toggle' ;
55import { ArrowPointer } from '@root/src/pages/sidepanel/assets/svg/ArrowPointer' ;
66import { appColors } from '@root/src/theme/palette' ;
7- import { appContent } from '@root/src/shared/content/appContent' ;
87
98interface DisabledStateProps {
109 documentationUrl : string ;
1110 onDocLinkClick : ( e : React . MouseEvent < HTMLAnchorElement > ) => void ;
11+ toggleLabel : string ;
12+ title : string ;
13+ description : string ;
14+ documentationText : string ;
15+ documentationLinkText : string ;
16+ documentationSuffix : string ;
1217}
1318
1419const Container = styled ( Stack ) ( ( { theme } ) => ( {
@@ -136,7 +141,16 @@ const StyledLink = styled(Link)(() => ({
136141 } ,
137142} ) ) ;
138143
139- export const DisabledState = ( { documentationUrl, onDocLinkClick } : DisabledStateProps ) : JSX . Element => {
144+ export const DisabledState = ( {
145+ documentationUrl,
146+ onDocLinkClick,
147+ toggleLabel,
148+ title,
149+ description,
150+ documentationText,
151+ documentationLinkText,
152+ documentationSuffix,
153+ } : DisabledStateProps ) : JSX . Element => {
140154 return (
141155 < Container >
142156 < OuterCard >
@@ -145,7 +159,7 @@ export const DisabledState = ({ documentationUrl, onDocLinkClick }: DisabledStat
145159 < ArrowPointer aria-hidden = "true" />
146160
147161 < ToggleCard >
148- < ToggleText > { appContent . disabledState . toggleLabel } </ ToggleText >
162+ < ToggleText > { toggleLabel } </ ToggleText >
149163 < SwitchWrapper >
150164 < Toggle checked disabled />
151165 </ SwitchWrapper >
@@ -155,10 +169,10 @@ export const DisabledState = ({ documentationUrl, onDocLinkClick }: DisabledStat
155169 < StyledCard >
156170 < Stack spacing = { 1 } alignItems = "center" textAlign = "center" >
157171 < Title variant = "h6" align = "center" >
158- { appContent . disabledState . title }
172+ { title }
159173 </ Title >
160174 < Description variant = "body2" color = "text.secondary" align = "center" >
161- { appContent . disabledState . description }
175+ { description }
162176 </ Description >
163177 </ Stack >
164178 </ StyledCard >
@@ -167,11 +181,11 @@ export const DisabledState = ({ documentationUrl, onDocLinkClick }: DisabledStat
167181
168182 < DocCard >
169183 < DocText variant = "body2" color = "text.secondary" align = "center" >
170- { appContent . disabledState . documentationText } { ' ' }
184+ { documentationText } { ' ' }
171185 < StyledLink variant = "body2" href = { documentationUrl } target = "_blank" onClick = { onDocLinkClick } >
172- { appContent . disabledState . documentationLinkText }
186+ { documentationLinkText }
173187 </ StyledLink >
174- { appContent . disabledState . documentationSuffix }
188+ { documentationSuffix }
175189 </ DocText >
176190 </ DocCard >
177191 </ Container >
0 commit comments