baseui 0.0.0-next-ff2e443 → 0.0.0-next-430cab5
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/block/types.d.ts +14 -5
- package/package.json +1 -1
package/block/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ElementType, ReactNode } from 'react';
|
|
2
|
+
import type { StyleObject } from 'styletron-standard';
|
|
2
3
|
import type { Override } from '../helpers/overrides';
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
export declare type BlockOverrides = {
|
|
@@ -199,12 +200,20 @@ export declare type StyledBlockProps = {
|
|
|
199
200
|
$textOverflow?: Responsive<string>;
|
|
200
201
|
$whiteSpace?: Responsive<WhiteSpace>;
|
|
201
202
|
};
|
|
203
|
+
declare type BaseProps<P extends {}> = P & {
|
|
204
|
+
$style?: StyleObject | ((props: P) => StyleObject);
|
|
205
|
+
className?: string;
|
|
206
|
+
};
|
|
207
|
+
declare type AddStyletronRef<P extends {
|
|
208
|
+
ref: any;
|
|
209
|
+
}> = P extends {
|
|
210
|
+
ref: infer R;
|
|
211
|
+
} ? P & {
|
|
212
|
+
$ref?: R;
|
|
213
|
+
} : P;
|
|
214
|
+
declare type OverrideProps<D extends React.ElementType, P extends {}> = BaseProps<P> & Omit<AddStyletronRef<React.ComponentProps<D>>, keyof BaseProps<P>>;
|
|
202
215
|
export interface BlockComponentType<D extends React.ElementType> {
|
|
203
|
-
<C extends React.ElementType = D>(props:
|
|
204
|
-
ref?: infer R;
|
|
205
|
-
} ? {
|
|
206
|
-
ref?: R;
|
|
207
|
-
} : {}) & Omit<StyledBlockProps & React.ComponentProps<C>, keyof BlockProps>): JSX.Element;
|
|
216
|
+
<C extends React.ElementType = D>(props: OverrideProps<C, BlockProps<C>>): JSX.Element;
|
|
208
217
|
displayName?: string;
|
|
209
218
|
}
|
|
210
219
|
export {};
|