@compiled/react 0.13.1 → 0.14.0
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/dist/browser/class-names/index.js.flow +1 -1
- package/dist/browser/css/index.js.flow +1 -1
- package/dist/browser/css-map/index.d.ts +21 -0
- package/dist/browser/css-map/index.js +5 -0
- package/dist/browser/css-map/index.js.flow +26 -0
- package/dist/browser/css-map/index.js.map +1 -0
- package/dist/browser/index.d.ts +1 -0
- package/dist/browser/index.js +1 -0
- package/dist/browser/index.js.flow +2 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/keyframes/index.js.flow +1 -1
- package/dist/browser/runtime/ac.js.flow +1 -1
- package/dist/browser/runtime/ax.js.flow +1 -1
- package/dist/browser/runtime/cache.js.flow +1 -1
- package/dist/browser/runtime/css-custom-property.js.flow +1 -1
- package/dist/browser/runtime/dev-warnings.js.flow +1 -1
- package/dist/browser/runtime/index.js.flow +1 -1
- package/dist/browser/runtime/is-server-environment.js.flow +1 -1
- package/dist/browser/runtime/sheet.js.flow +1 -1
- package/dist/browser/runtime/style-cache.js.flow +1 -1
- package/dist/browser/runtime/style.js.flow +1 -1
- package/dist/browser/runtime/types.js.flow +1 -1
- package/dist/browser/runtime.js.flow +1 -1
- package/dist/browser/styled/index.js.flow +1 -1
- package/dist/browser/types.d.ts +3 -3
- package/dist/browser/types.js.flow +4 -4
- package/dist/browser/utils/error.js.flow +1 -1
- package/dist/cjs/class-names/index.js.flow +1 -1
- package/dist/cjs/css/index.js.flow +1 -1
- package/dist/cjs/css-map/index.d.ts +21 -0
- package/dist/cjs/css-map/index.js +8 -0
- package/dist/cjs/css-map/index.js.flow +26 -0
- package/dist/cjs/css-map/index.js.map +1 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/index.js.flow +2 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/keyframes/index.js.flow +1 -1
- package/dist/cjs/runtime/ac.js.flow +1 -1
- package/dist/cjs/runtime/ax.js.flow +1 -1
- package/dist/cjs/runtime/cache.js.flow +1 -1
- package/dist/cjs/runtime/css-custom-property.js.flow +1 -1
- package/dist/cjs/runtime/dev-warnings.js.flow +1 -1
- package/dist/cjs/runtime/index.js.flow +1 -1
- package/dist/cjs/runtime/is-server-environment.js.flow +1 -1
- package/dist/cjs/runtime/sheet.js.flow +1 -1
- package/dist/cjs/runtime/style-cache.js.flow +1 -1
- package/dist/cjs/runtime/style.js.flow +1 -1
- package/dist/cjs/runtime/types.js.flow +1 -1
- package/dist/cjs/runtime.js.flow +1 -1
- package/dist/cjs/styled/index.js.flow +1 -1
- package/dist/cjs/types.d.ts +3 -3
- package/dist/cjs/types.js.flow +4 -4
- package/dist/cjs/utils/error.js.flow +1 -1
- package/dist/esm/class-names/index.js.flow +1 -1
- package/dist/esm/css/index.js.flow +1 -1
- package/dist/esm/css-map/index.d.ts +21 -0
- package/dist/esm/css-map/index.js +5 -0
- package/dist/esm/css-map/index.js.flow +26 -0
- package/dist/esm/css-map/index.js.map +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.flow +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/keyframes/index.js.flow +1 -1
- package/dist/esm/runtime/ac.js.flow +1 -1
- package/dist/esm/runtime/ax.js.flow +1 -1
- package/dist/esm/runtime/cache.js.flow +1 -1
- package/dist/esm/runtime/css-custom-property.js.flow +1 -1
- package/dist/esm/runtime/dev-warnings.js.flow +1 -1
- package/dist/esm/runtime/index.js.flow +1 -1
- package/dist/esm/runtime/is-server-environment.js.flow +1 -1
- package/dist/esm/runtime/sheet.js.flow +1 -1
- package/dist/esm/runtime/style-cache.js.flow +1 -1
- package/dist/esm/runtime/style.js.flow +1 -1
- package/dist/esm/runtime/types.js.flow +1 -1
- package/dist/esm/runtime.js.flow +1 -1
- package/dist/esm/styled/index.js.flow +1 -1
- package/dist/esm/types.d.ts +3 -3
- package/dist/esm/types.js.flow +4 -4
- package/dist/esm/utils/error.js.flow +1 -1
- package/package.json +3 -3
- package/src/class-names/index.js.flow +1 -1
- package/src/css/index.js.flow +1 -1
- package/src/css-map/__tests__/index.test.tsx +52 -0
- package/src/css-map/index.js.flow +26 -0
- package/src/css-map/index.ts +27 -0
- package/src/index.js.flow +2 -1
- package/src/index.ts +1 -0
- package/src/keyframes/index.js.flow +1 -1
- package/src/runtime/ac.js.flow +1 -1
- package/src/runtime/ax.js.flow +1 -1
- package/src/runtime/cache.js.flow +1 -1
- package/src/runtime/css-custom-property.js.flow +1 -1
- package/src/runtime/dev-warnings.js.flow +1 -1
- package/src/runtime/index.js.flow +1 -1
- package/src/runtime/is-server-environment.js.flow +1 -1
- package/src/runtime/sheet.js.flow +1 -1
- package/src/runtime/style-cache.js.flow +1 -1
- package/src/runtime/style.js.flow +1 -1
- package/src/runtime/types.js.flow +1 -1
- package/src/runtime.js.flow +1 -1
- package/src/styled/index.js.flow +1 -1
- package/src/types.js.flow +4 -4
- package/src/types.ts +3 -3
- package/src/utils/error.js.flow +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CSSProps, CssObject } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* ## cssMap
|
|
4
|
+
*
|
|
5
|
+
* Creates a collection of named CSS rules that are statically typed and useable with other Compiled APIs.
|
|
6
|
+
* For further details [read the documentation](https://compiledcssinjs.com/docs/api-cssmap).
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```
|
|
10
|
+
* const borderStyleMap = cssMap({
|
|
11
|
+
* none: { borderStyle: 'none' },
|
|
12
|
+
* solid: { borderStyle: 'solid' },
|
|
13
|
+
* });
|
|
14
|
+
* const Component = ({ borderStyle }) => <div css={css(borderStyleMap[borderStyle])} />
|
|
15
|
+
*
|
|
16
|
+
* <Component borderStyle="solid" />
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
type returnType<T extends string, P> = Record<T, CSSProps<P>>;
|
|
20
|
+
export default function cssMap<T extends string, TProps = unknown>(_styles: Record<T, CssObject<TProps> | CssObject<TProps>[]>): Readonly<returnType<T, TProps>>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for index
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
import type { CSSProps, CssObject } from '../types';
|
|
8
|
+
/**
|
|
9
|
+
* ## cssMap
|
|
10
|
+
*
|
|
11
|
+
* Creates a collection of named CSS rules that are statically typed and useable with other Compiled APIs.
|
|
12
|
+
* For further details [read the documentation](https://compiledcssinjs.com/docs/api-cssmap).
|
|
13
|
+
* @example ```
|
|
14
|
+
* const borderStyleMap = cssMap({
|
|
15
|
+
* none: { borderStyle: 'none' },
|
|
16
|
+
* solid: { borderStyle: 'solid' },
|
|
17
|
+
* });
|
|
18
|
+
* const Component = ({ borderStyle }) => <div css={css(borderStyleMap[borderStyle])} />
|
|
19
|
+
*
|
|
20
|
+
* <Component borderStyle="solid" />
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
declare type returnType<T: string, P> = { [key: T]: CSSProps<P> };
|
|
24
|
+
declare export default function cssMap<T: string, TProps>(_styles: {
|
|
25
|
+
[key: T]: CssObject<TProps> | CssObject<TProps>[],
|
|
26
|
+
}): $ReadOnly<returnType<T, TProps>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/css-map/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAqBlD,MAAM,CAAC,OAAO,UAAU,MAAM,CAC5B,OAA2D;IAE3D,MAAM,gBAAgB,EAAE,CAAC;AAC3B,CAAC"}
|
package/dist/browser/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { keyframes } from './keyframes';
|
|
|
6
6
|
export { styled } from './styled';
|
|
7
7
|
export { ClassNames } from './class-names';
|
|
8
8
|
export { default as css } from './css';
|
|
9
|
+
export { default as cssMap } from './css-map';
|
|
9
10
|
export declare const jsx: typeof createElement;
|
|
10
11
|
export declare namespace jsx {
|
|
11
12
|
namespace JSX {
|
package/dist/browser/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export { keyframes } from './keyframes';
|
|
|
3
3
|
export { styled } from './styled';
|
|
4
4
|
export { ClassNames } from './class-names';
|
|
5
5
|
export { default as css } from './css';
|
|
6
|
+
export { default as cssMap } from './css-map';
|
|
6
7
|
// Pass through the (classic) jsx runtime.
|
|
7
8
|
// Compiled currently doesn't define its own and uses this purely to enable a local jsx namespace.
|
|
8
9
|
export const jsx = createElement;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Flowtype definitions for index
|
|
3
3
|
* Generated by Flowgen from a Typescript Definition
|
|
4
|
-
* Flowgen v1.
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
5
|
* @flow
|
|
6
6
|
*/
|
|
7
7
|
import type { CssFunction, CSSProps, CssType } from './types';
|
|
@@ -10,3 +10,4 @@ declare export { keyframes } from './keyframes';
|
|
|
10
10
|
declare export { styled } from './styled';
|
|
11
11
|
declare export { ClassNames } from './class-names';
|
|
12
12
|
declare export { default as css } from './css';
|
|
13
|
+
declare export { default as cssMap } from './css-map';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAOtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAOtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,WAAW,CAAC;AAE9C,0CAA0C;AAC1C,kGAAkG;AAClG,MAAM,CAAC,MAAM,GAAG,GAAG,aAAa,CAAC"}
|
package/dist/browser/types.d.ts
CHANGED
|
@@ -13,8 +13,8 @@ export type CssType<TProps> = CSSProps<TProps> | CssObject<TProps> | FunctionInt
|
|
|
13
13
|
/**
|
|
14
14
|
* These are all the CSS props that will exist.
|
|
15
15
|
*/
|
|
16
|
-
export type CSSProps<TProps> = CSS.Properties<CssFunction<TProps
|
|
17
|
-
export type CssObject<TProps> = {
|
|
16
|
+
export type CSSProps<TProps> = Readonly<CSS.Properties<CssFunction<TProps>>>;
|
|
17
|
+
export type CssObject<TProps> = Readonly<{
|
|
18
18
|
[key: string]: CssFunction<TProps>;
|
|
19
|
-
}
|
|
19
|
+
}>;
|
|
20
20
|
export type CssFunction<TProps = unknown> = CssType<TProps> | BasicTemplateInterpolations | boolean | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Flowtype definitions for types
|
|
3
3
|
* Generated by Flowgen from a Typescript Definition
|
|
4
|
-
* Flowgen v1.
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
5
|
* @flow
|
|
6
6
|
*/
|
|
7
7
|
import * as CSS from 'csstype';
|
|
@@ -19,11 +19,11 @@ export type CssType<TProps> = CssObject<TProps> | FunctionInterpolation<TProps>
|
|
|
19
19
|
/**
|
|
20
20
|
* These are all the CSS props that will exist.
|
|
21
21
|
*/
|
|
22
|
-
export type CSSProps<TProps> = CSS.Properties<CssFunction<TProps
|
|
23
|
-
export type CssObject<TProps> = {
|
|
22
|
+
export type CSSProps<TProps> = $ReadOnly<CSS.Properties<CssFunction<TProps>>>;
|
|
23
|
+
export type CssObject<TProps> = $ReadOnly<{
|
|
24
24
|
...CSSProps<TProps>,
|
|
25
25
|
[key: string]: CssFunction<TProps>,
|
|
26
|
-
}
|
|
26
|
+
}>;
|
|
27
27
|
export type CssFunction<TProps = mixed> =
|
|
28
28
|
| CssType<TProps>
|
|
29
29
|
| BasicTemplateInterpolations
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CSSProps, CssObject } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* ## cssMap
|
|
4
|
+
*
|
|
5
|
+
* Creates a collection of named CSS rules that are statically typed and useable with other Compiled APIs.
|
|
6
|
+
* For further details [read the documentation](https://compiledcssinjs.com/docs/api-cssmap).
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```
|
|
10
|
+
* const borderStyleMap = cssMap({
|
|
11
|
+
* none: { borderStyle: 'none' },
|
|
12
|
+
* solid: { borderStyle: 'solid' },
|
|
13
|
+
* });
|
|
14
|
+
* const Component = ({ borderStyle }) => <div css={css(borderStyleMap[borderStyle])} />
|
|
15
|
+
*
|
|
16
|
+
* <Component borderStyle="solid" />
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
type returnType<T extends string, P> = Record<T, CSSProps<P>>;
|
|
20
|
+
export default function cssMap<T extends string, TProps = unknown>(_styles: Record<T, CssObject<TProps> | CssObject<TProps>[]>): Readonly<returnType<T, TProps>>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for index
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
import type { CSSProps, CssObject } from '../types';
|
|
8
|
+
/**
|
|
9
|
+
* ## cssMap
|
|
10
|
+
*
|
|
11
|
+
* Creates a collection of named CSS rules that are statically typed and useable with other Compiled APIs.
|
|
12
|
+
* For further details [read the documentation](https://compiledcssinjs.com/docs/api-cssmap).
|
|
13
|
+
* @example ```
|
|
14
|
+
* const borderStyleMap = cssMap({
|
|
15
|
+
* none: { borderStyle: 'none' },
|
|
16
|
+
* solid: { borderStyle: 'solid' },
|
|
17
|
+
* });
|
|
18
|
+
* const Component = ({ borderStyle }) => <div css={css(borderStyleMap[borderStyle])} />
|
|
19
|
+
*
|
|
20
|
+
* <Component borderStyle="solid" />
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
declare type returnType<T: string, P> = { [key: T]: CSSProps<P> };
|
|
24
|
+
declare export default function cssMap<T: string, TProps>(_styles: {
|
|
25
|
+
[key: T]: CssObject<TProps> | CssObject<TProps>[],
|
|
26
|
+
}): $ReadOnly<returnType<T, TProps>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/css-map/index.ts"],"names":[],"mappings":";;AACA,0CAAkD;AAqBlD,SAAwB,MAAM,CAC5B,OAA2D;IAE3D,MAAM,IAAA,wBAAgB,GAAE,CAAC;AAC3B,CAAC;AAJD,yBAIC"}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { keyframes } from './keyframes';
|
|
|
6
6
|
export { styled } from './styled';
|
|
7
7
|
export { ClassNames } from './class-names';
|
|
8
8
|
export { default as css } from './css';
|
|
9
|
+
export { default as cssMap } from './css-map';
|
|
9
10
|
export declare const jsx: typeof createElement;
|
|
10
11
|
export declare namespace jsx {
|
|
11
12
|
namespace JSX {
|
package/dist/cjs/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.jsx = exports.css = exports.ClassNames = exports.styled = exports.keyframes = void 0;
|
|
6
|
+
exports.jsx = exports.cssMap = exports.css = exports.ClassNames = exports.styled = exports.keyframes = void 0;
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
var keyframes_1 = require("./keyframes");
|
|
9
9
|
Object.defineProperty(exports, "keyframes", { enumerable: true, get: function () { return keyframes_1.keyframes; } });
|
|
@@ -13,6 +13,8 @@ var class_names_1 = require("./class-names");
|
|
|
13
13
|
Object.defineProperty(exports, "ClassNames", { enumerable: true, get: function () { return class_names_1.ClassNames; } });
|
|
14
14
|
var css_1 = require("./css");
|
|
15
15
|
Object.defineProperty(exports, "css", { enumerable: true, get: function () { return __importDefault(css_1).default; } });
|
|
16
|
+
var css_map_1 = require("./css-map");
|
|
17
|
+
Object.defineProperty(exports, "cssMap", { enumerable: true, get: function () { return __importDefault(css_map_1).default; } });
|
|
16
18
|
// Pass through the (classic) jsx runtime.
|
|
17
19
|
// Compiled currently doesn't define its own and uses this purely to enable a local jsx namespace.
|
|
18
20
|
exports.jsx = react_1.createElement;
|
package/dist/cjs/index.js.flow
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Flowtype definitions for index
|
|
3
3
|
* Generated by Flowgen from a Typescript Definition
|
|
4
|
-
* Flowgen v1.
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
5
|
* @flow
|
|
6
6
|
*/
|
|
7
7
|
import type { CssFunction, CSSProps, CssType } from './types';
|
|
@@ -10,3 +10,4 @@ declare export { keyframes } from './keyframes';
|
|
|
10
10
|
declare export { styled } from './styled';
|
|
11
11
|
declare export { ClassNames } from './class-names';
|
|
12
12
|
declare export { default as css } from './css';
|
|
13
|
+
declare export { default as cssMap } from './css-map';
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,iCAAsC;AAOtC,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,6BAAuC;AAA9B,2GAAA,OAAO,OAAO;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,iCAAsC;AAOtC,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,6BAAuC;AAA9B,2GAAA,OAAO,OAAO;AACvB,qCAA8C;AAArC,kHAAA,OAAO,OAAU;AAE1B,0CAA0C;AAC1C,kGAAkG;AACrF,QAAA,GAAG,GAAG,qBAAa,CAAC"}
|
package/dist/cjs/runtime.js.flow
CHANGED
package/dist/cjs/types.d.ts
CHANGED
|
@@ -13,8 +13,8 @@ export type CssType<TProps> = CSSProps<TProps> | CssObject<TProps> | FunctionInt
|
|
|
13
13
|
/**
|
|
14
14
|
* These are all the CSS props that will exist.
|
|
15
15
|
*/
|
|
16
|
-
export type CSSProps<TProps> = CSS.Properties<CssFunction<TProps
|
|
17
|
-
export type CssObject<TProps> = {
|
|
16
|
+
export type CSSProps<TProps> = Readonly<CSS.Properties<CssFunction<TProps>>>;
|
|
17
|
+
export type CssObject<TProps> = Readonly<{
|
|
18
18
|
[key: string]: CssFunction<TProps>;
|
|
19
|
-
}
|
|
19
|
+
}>;
|
|
20
20
|
export type CssFunction<TProps = unknown> = CssType<TProps> | BasicTemplateInterpolations | boolean | undefined;
|
package/dist/cjs/types.js.flow
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Flowtype definitions for types
|
|
3
3
|
* Generated by Flowgen from a Typescript Definition
|
|
4
|
-
* Flowgen v1.
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
5
|
* @flow
|
|
6
6
|
*/
|
|
7
7
|
import * as CSS from 'csstype';
|
|
@@ -19,11 +19,11 @@ export type CssType<TProps> = CssObject<TProps> | FunctionInterpolation<TProps>
|
|
|
19
19
|
/**
|
|
20
20
|
* These are all the CSS props that will exist.
|
|
21
21
|
*/
|
|
22
|
-
export type CSSProps<TProps> = CSS.Properties<CssFunction<TProps
|
|
23
|
-
export type CssObject<TProps> = {
|
|
22
|
+
export type CSSProps<TProps> = $ReadOnly<CSS.Properties<CssFunction<TProps>>>;
|
|
23
|
+
export type CssObject<TProps> = $ReadOnly<{
|
|
24
24
|
...CSSProps<TProps>,
|
|
25
25
|
[key: string]: CssFunction<TProps>,
|
|
26
|
-
}
|
|
26
|
+
}>;
|
|
27
27
|
export type CssFunction<TProps = mixed> =
|
|
28
28
|
| CssType<TProps>
|
|
29
29
|
| BasicTemplateInterpolations
|