Merge branch '21128-toolbar-context-menu'
[arvados-workbench2.git] / src / components / default-code-snippet / default-code-snippet.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import React from 'react';
6 import { MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles';
7 import { CodeSnippet, CodeSnippetDataProps } from 'components/code-snippet/code-snippet';
8 import grey from '@material-ui/core/colors/grey';
9 import { themeOptions } from 'common/custom-theme';
10
11 const theme = createMuiTheme(Object.assign({}, themeOptions, {
12     overrides: {
13         MuiTypography: {
14             body1: {
15                 color: grey["900"]
16             },
17             root: {
18                 backgroundColor: grey["200"]
19             }
20         }
21     },
22     typography: {
23         fontFamily: 'monospace',
24         useNextVariants: true,
25     }
26 }));
27
28 export const DefaultCodeSnippet = (props: CodeSnippetDataProps) =>
29     <MuiThemeProvider theme={theme}>
30         <CodeSnippet {...props} />
31     </MuiThemeProvider>;