Skip to content

Commit 7daa9dd

Browse files
committed
update component types to use PropsWithChildren
1 parent 8633e6c commit 7daa9dd

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

src/DailyParticipants.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ export const participantState = selectorFamily<
4040
},
4141
});
4242

43-
export const DailyParticipants: React.FC = ({ children }) => {
43+
export const DailyParticipants: React.FC<React.PropsWithChildren<{}>> = ({
44+
children,
45+
}) => {
4446
const daily = useDaily();
4547

4648
useDailyEvent(

src/DailyProvider.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ type Props =
3232

3333
type EventsMap = Partial<Record<DailyEvent, Map<number, Function>>>;
3434

35-
export const DailyProvider: React.FC<Props> = ({ children, ...props }) => {
35+
export const DailyProvider: React.FC<React.PropsWithChildren<Props>> = ({
36+
children,
37+
...props
38+
}) => {
3639
const [callObject, setCallObject] = useState<DailyCall | null>(
3740
'callObject' in props ? props.callObject : null
3841
);

src/DailyRoom.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ export const roomState = atom<DailyRoomInfo | null>({
1010
default: null,
1111
});
1212

13-
export const DailyRoom: React.FC = ({ children }) => {
13+
export const DailyRoom: React.FC<React.PropsWithChildren<{}>> = ({
14+
children,
15+
}) => {
1416
const daily = useDaily();
1517

1618
const updateRoom = useRecoilCallback(

0 commit comments

Comments
 (0)