File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -181,13 +181,17 @@ export declare const If: FC<PropsWithChildren<IfProps>>;
181
181
## ` <Switch /> ` ` <Case /> ` ` <Default /> ` Props
182
182
183
183
``` tsx
184
- import { FC , PropsWithChildren } from ' react' ;
184
+ import { type FC , type PropsWithChildren } from ' react' ;
185
185
export declare const Switch: FC <PropsWithChildren <{}>>;
186
- export interface CaseProps {
186
+
187
+ type TagType = React .ElementType | keyof JSX .IntrinsicElements ;
188
+ interface CaseElementProps <T extends TagType > {
189
+ as? : T ;
187
190
readonly condition? : boolean ;
188
191
}
189
- export declare const Case: FC <PropsWithChildren <CaseProps >>;
190
- export declare const Default: FC <PropsWithChildren >;
192
+ export type CaseProps <T extends TagType > = CaseElementProps <T > & React .ComponentPropsWithoutRef <T >;
193
+ export declare const Case: <T extends TagType >(props : CaseProps <T >) => null ;
194
+ export declare const Default: <T extends TagType >(props : CaseProps <T >) => null ;
191
195
```
192
196
193
197
## Development
You can’t perform that action at this time.
0 commit comments