File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
packages/graphiql/src/components Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " graphiql " : minor
3
+ ---
4
+
5
+ add ` className ` prop. Additional class names which will be appended to the GraphiQL container element
Original file line number Diff line number Diff line change @@ -225,6 +225,10 @@ export type GraphiQLInterfaceProps = WriteableEditorProps &
225
225
* rendered with a specific theme
226
226
*/
227
227
forcedTheme ?: ( typeof THEMES ) [ number ] ;
228
+ /**
229
+ * Additional class names which will be appended to the container element.
230
+ */
231
+ className ?: string ;
228
232
} ;
229
233
230
234
const THEMES = [ 'light' , 'dark' , 'system' ] as const ;
@@ -465,9 +469,14 @@ export function GraphiQLInterface(props: GraphiQLInterfaceProps) {
465
469
</ Tooltip >
466
470
) ;
467
471
472
+ const className = props . className ? ` ${ props . className } ` : '' ;
473
+
468
474
return (
469
475
< Tooltip . Provider >
470
- < div data-testid = "graphiql-container" className = "graphiql-container" >
476
+ < div
477
+ data-testid = "graphiql-container"
478
+ className = { `graphiql-container${ className } ` }
479
+ >
471
480
< div className = "graphiql-sidebar" >
472
481
< div className = "graphiql-sidebar-section" >
473
482
{ pluginContext ?. plugins . map ( ( plugin , index ) => {
You can’t perform that action at this time.
0 commit comments