diff --git a/src/AppBar.tsx b/src/AppBar.tsx index 85a03564..15246e02 100644 --- a/src/AppBar.tsx +++ b/src/AppBar.tsx @@ -88,7 +88,7 @@ export const AppBar: FC = ({ children }) => { {title} )} - {secondaryButton ?? "x"} + {secondaryButton} {children} diff --git a/src/button/Button.tsx b/src/button/Button.tsx index a3cb3910..31335370 100644 --- a/src/button/Button.tsx +++ b/src/button/Button.tsx @@ -160,26 +160,33 @@ export const LoudspeakerButton: FC = (props) => { interface SettingsButtonProps extends ComponentPropsWithoutRef<"button"> { size?: "sm" | "lg"; - /** If the button should be styled so it fits into the footer center buttons group - * This implies the button will be hidden unless we are on very small screens. - */ + /** If the button should be styled so it fits into the footer center buttons group */ forButtonsBar?: boolean; + /** If this buttons should be setup to be used in the app bar */ + showForScreenWidth?: "wide" | "narrow"; } -export const SettingsButton: FC = (props) => { +export const SettingsButton: FC = ({ + showForScreenWidth, + forButtonsBar, + className, + ...props +}) => { const { t } = useTranslation(); return ( diff --git a/src/components/InCallFooter.module.css b/src/components/InCallFooter.module.css index 9db32db3..da96af5f 100644 --- a/src/components/InCallFooter.module.css +++ b/src/components/InCallFooter.module.css @@ -78,17 +78,10 @@ Please see LICENSE in the repository root for full details. } } -.settingForButtonsBar { - /* - never show the settings button for the buttons bar - show the settings button in the Buttons bar on width < 500px - */ +.settingsOnlyShowNarrow { display: none; } -.settingForBottomLeftCorner { - /* - show the settings button in the bottom left corner by default (will be hidden on width < 500px) - */ +.settingsOnlyShowWide { display: inherit; } @@ -101,12 +94,13 @@ Once we exceed 500 we hide everything except the buttons. grid-template-areas: "buttons buttons buttons"; } - .settingForButtonsBar { + .settingsOnlyShowNarrow { display: inherit; } - .settingForBottomLeftCorner { + .settingsOnlyShowWide { display: none; } + .settingsLogoContainer { display: none; } diff --git a/src/components/InCallFooter.tsx b/src/components/InCallFooter.tsx index d0906305..cbc346cc 100644 --- a/src/components/InCallFooter.tsx +++ b/src/components/InCallFooter.tsx @@ -94,7 +94,12 @@ export const InCallFooter: FC = ({ // add the settings button to the center group of buttons, so it will be visible on small screens. // On larger screens, it will be hidden and the one without `forButtonsBar` in the `settingsLogoContainer` will be visible. buttons.push( - , + , ); } @@ -157,8 +162,7 @@ export const InCallFooter: FC = ({ if (audioOutputButton) buttons.push(audioOutputButton); useAppBarSecondaryButton( - // , -
, + , ); buttons.push( @@ -196,7 +200,11 @@ export const InCallFooter: FC = ({ >
{showSettingsButton && ( - + )} {showLogoDebugContainer && logoDebugContainer}