forked from callstack/react-native-paper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdrawer-section.html
36 lines (34 loc) · 12.2 KB
/
drawer-section.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<html lang="en" data-reactroot=""><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"/><meta name="mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="description" content="A DrawerSection groups content inside a navigation drawer."/><meta name="twitter:card" content="summary"/><meta name="twitter:title" content="DrawerSection"/><meta name="twitter:description" content="A DrawerSection groups content inside a navigation drawer."/><meta property="og:type" content="website"/><meta property="og:title" content="DrawerSection"/><meta property="og:description" content="A DrawerSection groups content inside a navigation drawer."/><title>DrawerSection</title><link type="text/css" rel="stylesheet" href="app.css"/></head><body><div id='root'><div class="_wrapper__1nbmuhq" data-reactroot=""><aside class="_sidebar__1gt5k1p"><input type="checkbox" class="_menuButton__1gt5k1p" id="slide-sidebar" role="button"/><label class="_menuIcon__1gt5k1p" for="slide-sidebar">☰</label><div class="_menu__1gt5k1p"><input type="search" value="" placeholder="Filter…" class="_searchbar__1gt5k1p"/><nav class="_navigation__1gt5k1p"><a class="_link__1gt5k1p" href="index.html">Home</a><a class="_link__1gt5k1p" href="showcase.html">Showcase</a><a class="_link__1gt5k1p" href="getting-started.html">Getting Started</a><a class="_link__1gt5k1p" href="theming.html">Theming</a><a class="_link__1gt5k1p" href="icons.html">Icons</a><a class="_link__1gt5k1p" href="contributing.html">Contributing</a><hr class="_separator__1gt5k1p"/><a class="_link__1gt5k1p" href="bottom-navigation.html">BottomNavigation</a><a class="_link__1gt5k1p" href="button.html">Button</a><a class="_link__1gt5k1p" href="caption.html">Caption</a><a class="_link__1gt5k1p" href="card.html">Card</a><a class="_link__1gt5k1p" href="card-actions.html">CardActions</a><a class="_link__1gt5k1p" href="card-content.html">CardContent</a><a class="_link__1gt5k1p" href="card-cover.html">CardCover</a><a class="_link__1gt5k1p" href="checkbox.html">Checkbox</a><a class="_link__1gt5k1p" href="chip.html">Chip</a><a class="_link__1gt5k1p" href="dialog.html">Dialog</a><a class="_link__1gt5k1p" href="dialog-actions.html">DialogActions</a><a class="_link__1gt5k1p" href="dialog-content.html">DialogContent</a><a class="_link__1gt5k1p" href="dialog-scroll-area.html">DialogScrollArea</a><a class="_link__1gt5k1p" href="dialog-title.html">DialogTitle</a><a class="_link__1gt5k1p" href="divider.html">Divider</a><a class="_link__1gt5k1p" href="drawer-item.html">DrawerItem</a><a class="_link__1gt5k1p _active__1gt5k1p" href="drawer-section.html">DrawerSection</a><a class="_link__1gt5k1p" href="fab.html">FAB</a><a class="_link__1gt5k1p" href="fabgroup.html">FABGroup</a><a class="_link__1gt5k1p" href="headline.html">Headline</a><a class="_link__1gt5k1p" href="helper-text.html">HelperText</a><a class="_link__1gt5k1p" href="list-accordion.html">ListAccordion</a><a class="_link__1gt5k1p" href="list-item.html">ListItem</a><a class="_link__1gt5k1p" href="list-section.html">ListSection</a><a class="_link__1gt5k1p" href="modal.html">Modal</a><a class="_link__1gt5k1p" href="paper.html">Paper</a><a class="_link__1gt5k1p" href="paragraph.html">Paragraph</a><a class="_link__1gt5k1p" href="progress-bar.html">ProgressBar</a><a class="_link__1gt5k1p" href="radio-button.html">RadioButton</a><a class="_link__1gt5k1p" href="radio-button-group.html">RadioButtonGroup</a><a class="_link__1gt5k1p" href="searchbar.html">Searchbar</a><a class="_link__1gt5k1p" href="snackbar.html">Snackbar</a><a class="_link__1gt5k1p" href="subheading.html">Subheading</a><a class="_link__1gt5k1p" href="switch.html">Switch</a><a class="_link__1gt5k1p" href="text.html">Text</a><a class="_link__1gt5k1p" href="text-input.html">TextInput</a><a class="_link__1gt5k1p" href="title.html">Title</a><a class="_link__1gt5k1p" href="toolbar.html">Toolbar</a><a class="_link__1gt5k1p" href="toolbar-action.html">ToolbarAction</a><a class="_link__1gt5k1p" href="toolbar-back-action.html">ToolbarBackAction</a><a class="_link__1gt5k1p" href="toolbar-content.html">ToolbarContent</a><a class="_link__1gt5k1p" href="touchable-ripple.html">TouchableRipple</a></nav></div></aside><div class="_container__z02bld"><main class="_content__z02bld"><div class="_container__vv20rl"><h1 class="_title__vv20rl">DrawerSection</h1><div class="_markdown__vv20rl _markdown__1e8xr4b"><p>A DrawerSection groups content inside a navigation drawer.</p>
<h2>Usage</h2>
<pre><code class="language-js"><span class="token keyword keyword-import" >import</span> <span class="token operator" >*</span> <span class="token keyword keyword-as" >as</span> React <span class="token keyword keyword-from" >from</span> <span class="token string" >'react'</span><span class="token punctuation" >;</span>
<span class="token keyword keyword-import" >import</span> <span class="token punctuation brackets-braces" >{</span> DrawerSection<span class="token punctuation" >,</span> DrawerItem <span class="token punctuation brackets-braces" >}</span> <span class="token keyword keyword-from" >from</span> <span class="token string" >'react-native-paper'</span><span class="token punctuation" >;</span>
<span class="token keyword keyword-export" >export</span> <span class="token keyword keyword-default" >default</span> <span class="token keyword keyword-class" >class</span> <span class="token class-name" >MyComponent</span> <span class="token keyword keyword-extends" >extends</span> <span class="token class-name" >React<span class="token punctuation" >.</span>Component</span> <span class="token punctuation brackets-braces" >{</span>
state <span class="token operator" >=</span> <span class="token punctuation brackets-braces" >{</span>
active<span class="token punctuation" >:</span> <span class="token string" >'First Item'</span><span class="token punctuation" >,</span>
<span class="token punctuation brackets-braces" >}</span><span class="token punctuation" >;</span>
<span class="token function" >render</span><span class="token punctuation brackets-parentheses" >(</span><span class="token punctuation brackets-parentheses" >)</span> <span class="token punctuation brackets-braces" >{</span>
<span class="token keyword keyword-const" >const</span> <span class="token punctuation brackets-braces" >{</span> active <span class="token punctuation brackets-braces" >}</span> <span class="token operator" >=</span> <span class="token keyword keyword-this" >this</span><span class="token punctuation" >.</span>state<span class="token punctuation" >;</span>
<span class="token keyword keyword-return" >return</span> <span class="token punctuation brackets-parentheses" >(</span>
<span class="token tag" ><span class="token tag" ><span class="token punctuation" ><</span>DrawerSection</span> <span class="token attr-name" >title</span><span class="token attr-value" ><span class="token punctuation" >=</span><span class="token punctuation" >"</span>Some</span> <span class="token attr-name" >title"</span><span class="token punctuation" >></span></span>
<span class="token tag" ><span class="token tag" ><span class="token punctuation" ><</span>DrawerItem</span>
<span class="token attr-name" >label</span><span class="token attr-value" ><span class="token punctuation" >=</span><span class="token punctuation" >"</span>First</span> <span class="token attr-name" >Item"</span>
<span class="token attr-name" >active</span><span class="token script language-javascript" ><span class="token punctuation" >=</span><span class="token punctuation brackets-braces" >{</span>active <span class="token operator" >===</span> <span class="token string" >'First Item'</span><span class="token punctuation brackets-braces" >}</span></span>
<span class="token attr-name" >onPress</span><span class="token script language-javascript" ><span class="token punctuation" >=</span><span class="token punctuation brackets-braces" >{</span><span class="token punctuation brackets-parentheses" >(</span><span class="token punctuation brackets-parentheses" >)</span> <span class="token operator" >=</span><span class="token operator" >></span> <span class="token punctuation brackets-braces" >{</span> <span class="token keyword keyword-this" >this</span><span class="token punctuation" >.</span><span class="token function" >setState</span><span class="token punctuation brackets-parentheses" >(</span><span class="token punctuation brackets-braces" >{</span> active<span class="token punctuation" >:</span> <span class="token string" >'First Item'</span> <span class="token punctuation brackets-braces" >}</span><span class="token punctuation brackets-parentheses" >)</span><span class="token punctuation" >;</span> <span class="token punctuation brackets-braces" >}</span></span><span class="token attr-name" >}</span>
<span class="token punctuation" >/></span></span>
<span class="token tag" ><span class="token tag" ><span class="token punctuation" ><</span>DrawerItem</span>
<span class="token attr-name" >label</span><span class="token attr-value" ><span class="token punctuation" >=</span><span class="token punctuation" >"</span>Second</span> <span class="token attr-name" >Item"</span>
<span class="token attr-name" >active</span><span class="token script language-javascript" ><span class="token punctuation" >=</span><span class="token punctuation brackets-braces" >{</span>active <span class="token operator" >===</span> <span class="token string" >'Second Item'</span><span class="token punctuation brackets-braces" >}</span></span>
<span class="token attr-name" >onPress</span><span class="token script language-javascript" ><span class="token punctuation" >=</span><span class="token punctuation brackets-braces" >{</span><span class="token punctuation brackets-parentheses" >(</span><span class="token punctuation brackets-parentheses" >)</span> <span class="token operator" >=</span><span class="token operator" >></span> <span class="token punctuation brackets-braces" >{</span> <span class="token keyword keyword-this" >this</span><span class="token punctuation" >.</span><span class="token function" >setState</span><span class="token punctuation brackets-parentheses" >(</span><span class="token punctuation brackets-braces" >{</span> active<span class="token punctuation" >:</span> <span class="token string" >'Second Item'</span> <span class="token punctuation brackets-braces" >}</span><span class="token punctuation brackets-parentheses" >)</span><span class="token punctuation" >;</span> <span class="token punctuation brackets-braces" >}</span></span><span class="token attr-name" >}</span>
<span class="token punctuation" >/></span></span>
<span class="token tag" ><span class="token tag" ><span class="token punctuation" ></</span>DrawerSection</span><span class="token punctuation" >></span></span>
<span class="token punctuation brackets-parentheses" >)</span><span class="token punctuation" >;</span>
<span class="token punctuation brackets-braces" >}</span>
<span class="token punctuation brackets-braces" >}</span>
</code></pre>
</div><h2 class="_propsHeader__vv20rl">Props</h2><div class="_propInfo__vv20rl"><a class="_propLabel__vv20rl" name="title" href="#title"><code>title</code></a><div class="_propItem__vv20rl"><span>Type: </span><code>string</code></div><div class="_propItem__vv20rl _markdown__vv20rl _markdown__1e8xr4b"><p>Title to show as the header for the section.</p>
</div></div><div class="_propInfo__vv20rl"><a class="_propLabel__vv20rl" name="children" href="#children"><code>children</code> (required)</a><div class="_propItem__vv20rl"><span>Type: </span><code>React.Node</code></div><div class="_propItem__vv20rl _markdown__vv20rl _markdown__1e8xr4b"><p>Content of the <code>DrawerSection</code>.</p>
</div></div><div class="_propInfo__vv20rl"><a class="_propLabel__vv20rl" name="theme" href="#theme"><code>theme</code></a><div class="_propItem__vv20rl"><span>Type: </span><code>Theme</code></div><div class="_propItem__vv20rl _markdown__vv20rl _markdown__1e8xr4b"></div></div></div></main></div></div></div>
<script>
window.__INITIAL_PATH__ = 'drawer-section';
</script>
<script src="app.bundle.js"></script></body></html>