1
1
import 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' ;
3
3
import {
4
4
DataSourcePluginOptionsEditorProps ,
5
5
onUpdateDatasourceJsonDataOptionSelect ,
@@ -79,7 +79,6 @@ export const ConnectionConfig: FC<ConnectionConfigProps> = (props: ConnectionCon
79
79
} , [ loadRegions ] ) ;
80
80
81
81
const inputWidth = inExperimentalAuthComponent ? 'width-20' : 'width-30' ;
82
- const styles = useStyles2 ( getStyles ) ;
83
82
84
83
return (
85
84
< >
@@ -91,7 +90,6 @@ export const ConnectionConfig: FC<ConnectionConfigProps> = (props: ConnectionCon
91
90
setIsARNInstructionsOpen = { setIsARNInstructionsOpen }
92
91
awsAssumeRoleEnabled = { awsAssumeRoleEnabled }
93
92
regions = { regions }
94
- assumeRoleInstructionsStyle = { styles . assumeRoleInstructions }
95
93
{ ...props }
96
94
/>
97
95
) : (
@@ -176,7 +174,7 @@ export const ConnectionConfig: FC<ConnectionConfigProps> = (props: ConnectionCon
176
174
) }
177
175
178
176
{ options . jsonData . authType === AwsAuthType . GrafanaAssumeRole && (
179
- < div className = { styles . assumeRoleInstructions } >
177
+ < div className = { assumeRoleInstructionsStyle } >
180
178
< Collapse
181
179
label = { 'How to create an IAM role for grafana to assume:' }
182
180
collapsible = { true }
@@ -305,10 +303,7 @@ export const ConnectionConfig: FC<ConnectionConfigProps> = (props: ConnectionCon
305
303
) ;
306
304
} ;
307
305
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