Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc: support dark theme for smart note plugin #949

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/components/SideDrawerView/SmartNoteApp.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { dynamicLoad, useApp } from '@ringcentral/mfe-react';
import { styled } from '@ringcentral/juno/foundation';
import { styled, useTheme } from '@ringcentral/juno/foundation';

const Container = styled.div`
width: 100%;
Expand All @@ -22,7 +22,9 @@ export function SmartNoteApp({
onClose,
onAlert,
smartNoteRemoteEntry,
themeType,
}) {
const theme = useTheme();
const SmartNotePlugin = useApp({
name: 'SmartNotes',
loader: () => {
Expand All @@ -43,6 +45,8 @@ export function SmartNoteApp({
client={client}
onClose={onClose}
onAlert={onAlert}
theme={theme}
themeType={themeType}
/>
</Container>
);
Expand Down
2 changes: 2 additions & 0 deletions src/components/SideDrawerView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export function SideDrawerView({
show,
onClose,
onAlert,
themeType,
}) {
if (!show) {
return null;
Expand All @@ -34,6 +35,7 @@ export function SideDrawerView({
onClose={onClose}
onAlert={onAlert}
smartNoteRemoteEntry={smartNoteRemoteEntry}
themeType={themeType}
/>
</StyledDrawer>
);
Expand Down
4 changes: 3 additions & 1 deletion src/modules/SideDrawerUI/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { RcUIModuleV2, action, state, watch } from '@ringcentral-integration/cor
'Locale',
'SmartNotes',
'Alert',
'Theme',
],
})
export class SideDrawerUI extends RcUIModuleV2 {
Expand All @@ -33,13 +34,14 @@ export class SideDrawerUI extends RcUIModuleV2 {
}

getUIProps() {
const { locale, smartNotes } = this._deps;
const { locale, smartNotes, theme } = this._deps;
return {
currentLocale: locale.currentLocale,
smartNoteSession: smartNotes.session,
show: this.show,
smartNoteClient: smartNotes.smartNoteClient,
smartNoteRemoteEntry: smartNotes.smartNoteMFERemoteEntry,
themeType: theme.themeType,
};
}

Expand Down
Loading