Skip to content

Commit

Permalink
doc: Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Aug 17, 2023
1 parent 1646906 commit 28c851d
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export default function App() {
}
```

## \<Only /> props
## `<Only />` props

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

## `<If />` Props

```tsx
import { ReactElement } from 'react';
import { FC, PropsWithChildren } from 'react';
export interface IfProps {
readonly condition?: boolean;
readonly render?: () => ReactElement;
}
export declare const If: FC<PropsWithChildren<IfProps>>;
```

## `<Switch />` `<Case />` `<Default />` Props

```tsx
import { FC, PropsWithChildren } from 'react';
export declare const Switch: FC<PropsWithChildren<{}>>;
export interface CaseProps {
readonly condition?: boolean;
}
export declare const Case: FC<PropsWithChildren<CaseProps>>;
export declare const Default: FC<PropsWithChildren>;
```

## Development

Expand Down

0 comments on commit 28c851d

Please sign in to comment.