Skip to content

Commit 28c851d

Browse files
committed
doc: Update README.md
1 parent 1646906 commit 28c851d

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

core/README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export default function App() {
125125
}
126126
```
127127

128-
## \<Only /> props
128+
## `<Only />` props
129129

130130
| prop name | type | default | isRequired | description |
131131
| ----- | ----- | ----- | ----- | ----- |
@@ -143,6 +143,29 @@ export default function App() {
143143
| `visibility` | Will render the child with `visibility:hidden` |
144144
| `css` | Will render the child with a CSS class (you can pass it a custom `className` prop) |
145145

146+
## `<If />` Props
147+
148+
```tsx
149+
import { ReactElement } from 'react';
150+
import { FC, PropsWithChildren } from 'react';
151+
export interface IfProps {
152+
readonly condition?: boolean;
153+
readonly render?: () => ReactElement;
154+
}
155+
export declare const If: FC<PropsWithChildren<IfProps>>;
156+
```
157+
158+
## `<Switch />` `<Case />` `<Default />` Props
159+
160+
```tsx
161+
import { FC, PropsWithChildren } from 'react';
162+
export declare const Switch: FC<PropsWithChildren<{}>>;
163+
export interface CaseProps {
164+
readonly condition?: boolean;
165+
}
166+
export declare const Case: FC<PropsWithChildren<CaseProps>>;
167+
export declare const Default: FC<PropsWithChildren>;
168+
```
146169

147170
## Development
148171

0 commit comments

Comments
 (0)