# This PR - Fix #6834 ## Demo https://www.loom.com/share/235c4425f3264f429e2064a9d1604a90?sid=02a815c9-3b1a-45e6-b5ce-d5eb3b40e10e ## Notes - There is a missing icon in Figma corresponding to the `noDeletedRecordFound` in the dark mode, thus I used the same icon (different background because we have the correct background image) for both dark / light modes <img width="625" alt="Screenshot 2024-09-03 at 15 04 57" src="https://github.com/user-attachments/assets/cbc0c3dd-a1ee-49a5-be9a-36450e78a992"> cc: @Bonapara --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
12 lines
340 B
TypeScript
12 lines
340 B
TypeScript
import { Context, createContext } from 'react';
|
|
|
|
type RootProps = Record<string, any>;
|
|
|
|
export type RootPropsContext<T extends RootProps> = T extends RootProps
|
|
? T
|
|
: never;
|
|
|
|
export const createRootPropsContext = <T extends RootProps>(): Context<
|
|
RootPropsContext<T>
|
|
> => createContext<RootPropsContext<T>>({} as RootPropsContext<T>);
|