Opting Out of the System Theme
The system theme is a theme on the Dart-Platform that ensures UI components in the User Module and MUI components have a consistent appearance.
However, some developers may prefer to showcase components with their own unique styles or may encounter issues where certain styles do not function correctly and thus may not want to use the system theme.
In such cases, the module can be built and deployed without the system theme by following these steps:
Within the render()
function of the Index.tsx
file,
Move components like
<App moduleContext={this.moduleContext} />
outside of the<ThemeProvider>
tag.Comment out the
<ThemeProvider>
JSX code or remove it entirely.To comment out the code in JSX, wrap the code you want to comment out with
/*
and*/
.
class MainScreen extends ModuleScreen {
constructor(props: ModuleScreenProps) {
super(props);
}
componentWillUnmount() {
// Must delete DrlUtils Instance to free up memory
DrlUtils.deleteInstance();
}
render() {
return (
/*<ThemeProvider theme={this.systemTheme}>
</ThemeProvider>*/
<App moduleContext={this.moduleContext} />
);
}
}