UNPKG

1.78 kBPlain TextView Raw
1import { jsx as coreJsx, ThemeUIJSX } from '@theme-ui/core'
2export {
3 __ThemeUIContext,
4 merge,
5 useThemeUI,
6 createElement,
7} from '@theme-ui/core'
8export type {
9 ThemeUIContextValue,
10 IntrinsicSxElements,
11 SxProp,
12 ColorMode,
13 ColorModesScale,
14 CSSObject,
15 CSSProperties,
16 CSSPseudoSelectorProps,
17 ResponsiveStyleValue,
18 ThemeUICSSProperties,
19 ThemeUIStyleObject,
20 ThemeUICSSObject,
21 Theme,
22 ThemeStyles,
23 TLengthStyledSystem,
24 StylePropertyValue,
25} from '@theme-ui/core'
26export { useColorMode, InitializeColorMode } from '@theme-ui/color-modes'
27export { Themed, Styled, components } from '@theme-ui/mdx'
28export { ThemeProvider } from '@theme-ui/theme-provider'
29export * from '@theme-ui/components'
30export { css, get } from '@theme-ui/css'
31
32export const BaseStyles = (props: Record<string, unknown>) =>
33 jsx('div', {
34 ...props,
35 sx: {
36 fontFamily: 'body',
37 lineHeight: 'body',
38 fontWeight: 'body',
39 variant: 'styles',
40 },
41 })
42
43export const jsx = coreJsx
44
45export declare namespace jsx {
46 export namespace JSX {
47 export interface Element extends ThemeUIJSX.Element {}
48 export interface ElementClass extends ThemeUIJSX.ElementClass {}
49 export interface ElementAttributesProperty
50 extends ThemeUIJSX.ElementAttributesProperty {}
51 export interface ElementChildrenAttribute
52 extends ThemeUIJSX.ElementChildrenAttribute {}
53 export type LibraryManagedAttributes<
54 C,
55 P
56 > = ThemeUIJSX.LibraryManagedAttributes<C, P>
57 export interface IntrinsicAttributes
58 extends ThemeUIJSX.IntrinsicAttributes {}
59 export interface IntrinsicClassAttributes<T>
60 extends ThemeUIJSX.IntrinsicClassAttributes<T> {}
61 export interface IntrinsicElements extends ThemeUIJSX.IntrinsicElements {}
62 }
63}