import { useContext } from 'react'; import { NativeBaseContext } from './../core/NativeBaseContext'; export function useTheme>() { const theme = useContext( (NativeBaseContext as unknown) as React.Context ); if (!theme) { throw Error( 'useTheme: `theme` is undefined. Seems you forgot to wrap your app in ``' ); } return theme; }