Skip to content

Commit

Permalink
fix floatingParticipantsView size on tablets
Browse files Browse the repository at this point in the history
  • Loading branch information
kristian-mkd committed Nov 22, 2024
1 parent 5fc43aa commit bb34276
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions sample-apps/react-native/dogfood/src/theme.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { DeepPartial, Theme } from '@stream-io/video-react-native-sdk';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { ThemeMode } from './contexts/AppContext';
import { Dimensions } from 'react-native';

const opacityToHex = (opacity: number) => {
return Math.round(opacity * 255)
Expand Down Expand Up @@ -51,6 +52,16 @@ export const useCustomTheme = (mode: ThemeMode): DeepPartial<Theme> => {
container: { paddingTop: 0, paddingBottom: 0 },
};

const { height, width } = Dimensions.get('window');
const floatingParticipantsView: DeepPartial<
Theme['floatingParticipantsView']
> = {
participantViewContainer: {
height: height * 0.2,
width: width * 0.25,
},
};

const lightThemeColors: DeepPartial<Theme['colors']> = {
buttonPrimary: '#005fff',
buttonSecondary: '#eff0f1',
Expand All @@ -71,6 +82,7 @@ export const useCustomTheme = (mode: ThemeMode): DeepPartial<Theme> => {
const baseTheme: DeepPartial<Theme> = {
variants,
callContent,
floatingParticipantsView,
};

if (mode === 'light') {
Expand Down

0 comments on commit bb34276

Please sign in to comment.