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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hot fix: resolved merge conflicts, updated UI breaking and updated props docs(rectified redundant code). #87

Closed
wants to merge 3 commits into from
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ yarn-error.log*
yarn.lock

# Remote docs
src/content/Props
# src/content/Props
react-native-elements
2 changes: 1 addition & 1 deletion src/components/playground/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export default ({ params }) => {
placeholder={Placeholder}
/>
</div>
<Error msg={params.errorProps.msg} isPopup />
<Knobs {...params.knobProps} />
<Error msg={params.errorProps.msg}/>
<Editor {...params.editorProps} />
<Error {...params.errorProps} />
<ActionButtons {...params.actions} />
Expand Down
2 changes: 1 addition & 1 deletion src/content/AirbnbRating/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { importMDX } from "mdx.macro";
import PropDrawer from "../../components/PropDrawer";

import Playground from "./searchbar.playground.jsx";
const Content = lazy(() => importMDX("../Props/rating.md"));
const Content = lazy(() => importMDX("../Props/airbnb.mdx"));

export default function AirbnbPlayground() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/content/Avatar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { importMDX } from "mdx.macro";
import PropDrawer from "../../components/PropDrawer";
import Playground from "./avatar.playground.jsx";

const Content = lazy(() => importMDX("../Props/avatar.md"));
const Content = lazy(() => importMDX("../Props/avatar.mdx"));

export default function Avatar() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/content/Badge/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PropDrawer from "../../components/PropDrawer";

import Playground from "./badge.playground.jsx";

const Content = lazy(() => importMDX("../Props/badge.md"));
const Content = lazy(() => importMDX("../Props/badge.mdx"));
export default function TilePlayground() {
return (
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/content/BottomSheet/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PropDrawer from "../../components/PropDrawer";

import Playground from "./bottomsheet.playground.jsx";

const Content = lazy(() => importMDX("../Props/rating.md"));
const Content = lazy(() => importMDX("../Props/bottomsheet.mdx"));
export default function BottomSheetPlayground() {
return (
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/content/Button/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { importMDX } from "mdx.macro";
import PropDrawer from "../../components/PropDrawer";
import Playground from "./button.playground.jsx";

const Content = lazy(() => importMDX("../Props/button.md"));
const Content = lazy(() => importMDX("../Props/button.mdx"));
class App extends Component {
render() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/content/ButtonGroup/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { importMDX } from "mdx.macro";
import PropDrawer from "../../components/PropDrawer";

import Playground from "./buttongroup.playground.jsx";
const Content = lazy(() => importMDX("../Props/button_group.md"));
const Content = lazy(() => importMDX("../Props/button_group.mdx"));

export default function ButtonGroupPlayground() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/content/Card/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PropDrawer from "../../components/PropDrawer";

import Playground from "./card.playground.jsx";

const Content = lazy(() => importMDX("../Props/rating.md"));
const Content = lazy(() => importMDX("../Props/card.mdx"));

export default function CardPlayground() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/content/CheckBox/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { importMDX } from "mdx.macro";
import PropDrawer from "../../components/PropDrawer";

import Playground from "./checkbox.playground.jsx";
const Content = lazy(() => importMDX("../Props/checkbox.md"));
const Content = lazy(() => importMDX("../Props/checkbox.mdx"));

export default function CheckBoxPlayground() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/content/Divider/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PropDrawer from "../../components/PropDrawer";

import Playground from "./divider.playground.jsx";

const Content = lazy(() => importMDX("../Props/divider.md"));
const Content = lazy(() => importMDX("../Props/divider.mdx"));

export default function DividerPlayground() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/content/Header/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PropDrawer from "../../components/PropDrawer";

import Playground from "./header.playground.jsx";

const Content = lazy(() => importMDX("../Props/header.md"));
const Content = lazy(() => importMDX("../Props/header.mdx"));

export default function HeaderPlayground() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/content/Icon/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { importMDX } from "mdx.macro";
import PropDrawer from "../../components/PropDrawer";

import Playground from "./icon.playground.jsx";
const Content = lazy(() => importMDX("../Props/icon.md"));
const Content = lazy(() => importMDX("../Props/icon.mdx"));

export default function IconPlayground() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/content/Image/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { importMDX } from "mdx.macro";
import PropDrawer from "../../components/PropDrawer";
import Playground from "./input.playground.jsx";

const Content = lazy(() => importMDX("../Props/image.md"));
const Content = lazy(() => importMDX("../Props/image.mdx"));

export default function ImagePlayground() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/content/Input/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { importMDX } from "mdx.macro";
import PropDrawer from "../../components/PropDrawer";

import Playground from "./input.playground.jsx";
const Content = lazy(() => importMDX("../Props/rating.md"));
const Content = lazy(() => importMDX("../Props/input.mdx"));

export default function InputPlayground() {
return (
Expand Down
7 changes: 6 additions & 1 deletion src/content/ListItem/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@ import PropDrawer from "../../components/PropDrawer";

import Playground from "./listitem.playground.jsx";

const Content = lazy(() => importMDX("../Props/listitem.md"));
const Content = lazy(() => importMDX("../Props/listitem.mdx"));

export default function ListItemPlayground() {
return (
<div>
<Playground />
<Suspense fallback={<div>Loading...</div>}>
<PropDrawer>
<Content />
</PropDrawer>
</Suspense>
</div>
);
}
2 changes: 1 addition & 1 deletion src/content/Overlay/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Playground from "./overlay.playground.jsx";
import { importMDX } from "mdx.macro";
import PropDrawer from "../../components/PropDrawer";

const Content = lazy(() => importMDX("../Props/overlay.md"));
const Content = lazy(() => importMDX("../Props/overlay.mdx"));

export default function OverlayPlayground() {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/content/Pricing/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PropDrawer from "../../components/PropDrawer";

import Playground from "./pricing.playground.jsx";

const Content = lazy(() => importMDX("../Props/pricing.md"));
const Content = lazy(() => importMDX("../Props/pricing.mdx"));

export default function PricingPlayground() {
return (
Expand Down
49 changes: 49 additions & 0 deletions src/content/Props/airbnb.mdx
Original file line number Diff line number Diff line change
@@ -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 |
Loading