Skip to content

Commit

Permalink
created theme file to override conatiner styles (#441)
Browse files Browse the repository at this point in the history
Co-authored-by: mashm <[email protected]>
  • Loading branch information
4manasa and mashm authored Mar 3, 2024
1 parent 39dae6a commit d1918e0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 22 deletions.
12 changes: 1 addition & 11 deletions src/samples/Embedded/EmbeddedTopLevel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { compareSdkPCoreVersions } from '@pega/react-sdk-components/lib/componen

import { getSdkComponentMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
import localSdkComponentMap from '../../../../sdk-local-component-map';
import { theme } from '../../../../theme';

declare const myLoadMashup: any;

Expand Down Expand Up @@ -105,17 +106,6 @@ const useStyles = makeStyles(theme => ({
}));

export default function EmbeddedTopLevel() {
const theme = createTheme({
// palette: {
// primary: {
// main: '#2196f3',
// },
// secondary: {
// main: '#ff9800',
// },
// },
});

// Array of 3 shopping options to display
const shoppingOptions = [
{
Expand Down
12 changes: 1 addition & 11 deletions src/samples/FullPortal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import InvalidPortal from './InvalidPortal';

import { getSdkComponentMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
import localSdkComponentMap from '../../../sdk-local-component-map';
import { theme } from '../../../theme';

declare const myLoadPortal: any;
declare const myLoadDefaultPortal: any;
Expand All @@ -33,17 +34,6 @@ export default function FullPortal() {
sessionStorage.setItem('rsdk_portalName', portalValue);
}

const theme = createTheme({
// palette: {
// primary: {
// main: '#2196f3',
// },
// secondary: {
// main: '#ff9800',
// },
// },
});

// const outlet = document.getElementById("outlet");

// from react_root.js with some modifications
Expand Down
18 changes: 18 additions & 0 deletions theme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { createTheme } from '@material-ui/core/styles';

export const theme = createTheme({
palette: {
primary: {
contrastText: '#fff',
dark: '#303f9f',
light: '#7986cb',
main: '#3f51b5'
},
secondary: {
contrastText: '#fff',
dark: '#c51162',
light: '#ff4081',
main: '#f50057'
}
}
});

0 comments on commit d1918e0

Please sign in to comment.