@shipengine/alchemy 0.4.4 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/element/element.d.ts +2 -3
- package/create-element.d.ts +3 -2
- package/index.js +14 -10
- package/index.mjs +677 -625
- package/package.json +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { SerializedStyles } from "@emotion/react";
|
|
2
1
|
import { WithConditionalCSSProp } from "@emotion/react/types/jsx-namespace";
|
|
3
2
|
import { TranslationResources } from "./hooks";
|
|
4
3
|
export type ElementComponentProps = object & WithConditionalCSSProp<object>;
|
|
@@ -9,8 +8,8 @@ export type ElementFallbackComponentProps = {
|
|
|
9
8
|
export type ElementFallbackComponent = React.ComponentType<ElementFallbackComponentProps>;
|
|
10
9
|
export interface ElementProps {
|
|
11
10
|
children: React.ReactElement<ElementComponentProps>;
|
|
12
|
-
|
|
11
|
+
className?: string;
|
|
13
12
|
fallback: ElementFallbackComponent;
|
|
14
13
|
resources?: TranslationResources;
|
|
15
14
|
}
|
|
16
|
-
export declare const Element: ({ children,
|
|
15
|
+
export declare const Element: ({ children, className, fallback: FallbackComponent, resources, }: ElementProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
package/create-element.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Theme } from "@emotion/react";
|
|
2
|
+
import { Interpolation } from "@emotion/serialize";
|
|
2
3
|
import { ElementComponent, ElementFallbackComponent, TranslationResources } from "./components";
|
|
3
4
|
export interface CreateElementOptions<T extends TranslationResources> {
|
|
4
|
-
css?:
|
|
5
|
+
css?: Interpolation<Theme>;
|
|
5
6
|
resources?: T;
|
|
6
7
|
}
|
|
7
8
|
export declare const createElement: <P extends object, T extends TranslationResources<import("./components").TranslationNamespaces>>(Component: ElementComponent<P>, fallback: ElementFallbackComponent, options?: CreateElementOptions<T> | undefined) => ({ resources, ...props }: P & {
|