-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bcf056a
commit f6d6a72
Showing
3 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React, { lazy, Suspense } from "react"; | ||
import { importMDX } from "mdx.macro"; | ||
|
||
import PropDrawer from "../../components/PropDrawer"; | ||
import Playground from "./tab.playground.jsx"; | ||
const Content = lazy(() => importMDX("../Props/tab.md")); | ||
|
||
export default function TabPlayground() { | ||
return ( | ||
<div> | ||
<Playground /> | ||
<Suspense fallback={<div>Loading...</div>}> | ||
<PropDrawer> | ||
<Content /> | ||
</PropDrawer> | ||
</Suspense> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import * as React from "react"; | ||
import { Tab } from "react-native-elements"; | ||
import Playground from "../../components/playground"; | ||
import { useView, PropTypes } from "react-view"; | ||
|
||
const TabPlayground = () => { | ||
const params = useView({ | ||
componentName: "Tab", | ||
props: { | ||
children: { | ||
value: ` | ||
<Tab.Item title="Recent" /> | ||
<Tab.Item title="favourite" /> | ||
<Tab.Item title="cart" /> | ||
`, | ||
type: PropTypes.ReactNode, | ||
}, | ||
value: { | ||
type: PropTypes.Number, | ||
value: 0, | ||
}, | ||
onChange: { | ||
type: PropTypes.Function, | ||
value: `() => console.log("onChange()")`, | ||
}, | ||
disableIndicator: { | ||
type: PropTypes.Boolean, | ||
value: false, | ||
}, | ||
indicatorStyle: { | ||
type: PropTypes.Object, | ||
value: `{}`, | ||
}, | ||
variant: { | ||
type: PropTypes.Enum, | ||
options: { primary: "primary", default: "default" }, | ||
value: "default", | ||
}, | ||
}, | ||
scope: { | ||
Tab, | ||
}, | ||
imports: { | ||
"react-native-elements": { | ||
named: ["Tab"], | ||
}, | ||
}, | ||
}); | ||
|
||
return ( | ||
<React.Fragment> | ||
<Playground params={params} /> | ||
</React.Fragment> | ||
); | ||
}; | ||
|
||
export default TabPlayground; |