11import React , { FC , useEffect , useMemo , useState } from 'react' ;
2- import { Input , Select , InlineField , ButtonGroup , ToolbarButton , FieldSet , Collapse , useStyles2 } from '@grafana/ui' ;
2+ import { Input , Select , InlineField , ButtonGroup , ToolbarButton , FieldSet , Collapse } from '@grafana/ui' ;
33import {
44 DataSourcePluginOptionsEditorProps ,
55 onUpdateDatasourceJsonDataOptionSelect ,
@@ -79,7 +79,6 @@ export const ConnectionConfig: FC<ConnectionConfigProps> = (props: ConnectionCon
7979 } , [ loadRegions ] ) ;
8080
8181 const inputWidth = inExperimentalAuthComponent ? 'width-20' : 'width-30' ;
82- const styles = useStyles2 ( getStyles ) ;
8382
8483 return (
8584 < >
@@ -91,7 +90,6 @@ export const ConnectionConfig: FC<ConnectionConfigProps> = (props: ConnectionCon
9190 setIsARNInstructionsOpen = { setIsARNInstructionsOpen }
9291 awsAssumeRoleEnabled = { awsAssumeRoleEnabled }
9392 regions = { regions }
94- assumeRoleInstructionsStyle = { styles . assumeRoleInstructions }
9593 { ...props }
9694 />
9795 ) : (
@@ -176,7 +174,7 @@ export const ConnectionConfig: FC<ConnectionConfigProps> = (props: ConnectionCon
176174 ) }
177175
178176 { options . jsonData . authType === AwsAuthType . GrafanaAssumeRole && (
179- < div className = { styles . assumeRoleInstructions } >
177+ < div className = { assumeRoleInstructionsStyle } >
180178 < Collapse
181179 label = { 'How to create an IAM role for grafana to assume:' }
182180 collapsible = { true }
@@ -305,10 +303,7 @@ export const ConnectionConfig: FC<ConnectionConfigProps> = (props: ConnectionCon
305303 ) ;
306304} ;
307305
308- function getStyles ( ) {
309- return {
310- assumeRoleInstructions : css ( {
311- maxWidth : '715px' ,
312- } ) ,
313- } ;
314- }
306+ export const assumeRoleInstructionsStyle = css ( {
307+ maxWidth : '715px' ,
308+ } )
309+
0 commit comments