Skip to content

Commit

Permalink
port changes from Chat mono repo
Browse files Browse the repository at this point in the history
  • Loading branch information
mgamis-msft committed Dec 19, 2024
1 parent c7a3595 commit 5cd49cd
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Chat/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Web site created using create-react-app" />
<title>ACS Chat Sample App</title>
Expand Down
2 changes: 1 addition & 1 deletion Chat/src/app/ChatHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface ChatHeaderProps {
export const ChatHeader = (props: ChatHeaderProps): JSX.Element => {
const theme = useTheme();

const leaveString = 'Leave';
const leaveString = 'Leave Chat';
return (
<Stack
horizontal={true}
Expand Down
2 changes: 1 addition & 1 deletion Chat/src/app/styles/ChatHeader.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const chatHeaderContainerStyle = mergeStyles({

export const leaveButtonStyle = mergeStyles({
marginRight: '0.625rem',
width: '6.688rem',
width: '8rem',
borderWidth: '0.125rem',
fontSize: '0.875rem', // 14px
fontWeight: 600
Expand Down
2 changes: 1 addition & 1 deletion Chat/src/app/theming/SwitchableFluentThemeProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ interface SwitchableFluentThemeContext {
themeStore: ThemeCollection;
}

const defaultTheme: NamedTheme = defaultThemes.Light;
const defaultTheme: NamedTheme = defaultThemes.Light as NamedTheme;

/**
* React useContext for FluentTheme state of SwitchableFluentThemeProvider
Expand Down
5 changes: 5 additions & 0 deletions Chat/src/app/theming/ThemeSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ export const ThemeSelector = (props: ThemeSelectorProps): JSX.Element => {
if (option) {
const themeName = option.key.toString();
const theme = themeStore[themeName];

if (!theme) {
throw new Error(`Theme ${themeName} not found in theme store`);
}

setCurrentTheme(theme);
}
};
Expand Down

0 comments on commit 5cd49cd

Please sign in to comment.