Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃殌 Feat: Add to airbnb prop explorer #53

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
49 changes: 49 additions & 0 deletions src/content/AirbnbRating/airbnb.mdx
@@ -0,0 +1,49 @@
# Props

- [`count`](#count)
- [`defaultRating`](#defaultRating)
- [`onFinishRating`](#onFinishRating)
- [`reviews`](#reviews)
- [`showRating`](#showRating)

---

# Reference

### `count`

Total number of ratings to display

| Type | Default |
| :----: | :-----: |
| number | 5 |

---

### `defaultRating`

Initial value for the rating defaultRating

| Type | Default |
| :------------: | :-----: |
| number | 1 |

---

### `reviews`

Labels to show when each value is tapped e.g. If the first star is tapped, then value in index 0 will be used as the label

| Type | Default |
| :------: | :------------------------------------------: |
| string[] | ['Terrible', 'Bad', 'Okay', 'Good', 'Great'] |

---

### `onFinishRating`

Callback method when the user finishes rating. Gives you the final rating value as a whole number (required)

| Type | Default |
| :------------: | :-----: |
| function | none |
11 changes: 10 additions & 1 deletion src/content/AirbnbRating/index.jsx
@@ -1,10 +1,19 @@
import React from "react";
import React, { lazy, Suspense } from "react";
import Playground from "./searchbar.playground.jsx";
import { importMDX } from "mdx.macro";
import PropDrawer from "../../components/PropDrawer";

const Content = lazy(() => importMDX("./airbnb.mdx"));

export default function AirbnbPlayground() {
return (
<div>
<Playground />
<Suspense fallback={<div>Loading...</div>}>
<PropDrawer>
<Content />
</PropDrawer>
</Suspense>
</div>
);
}
2 changes: 1 addition & 1 deletion src/content/Avatar/avatar.mdx
@@ -1,4 +1,4 @@
## Props
# Props

- [`activeOpacity`](#activeopacity)
- [`avatarStyle`](#avatarstyle)
Expand Down