mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-01 13:14:16 +08:00
65 lines
2.2 KiB
HTML
65 lines
2.2 KiB
HTML
---
|
|
layout: docs
|
|
title: MenuItem
|
|
edit_url: "https://github.com/nylas/N1/blob/master/src/components/menu.cjsx"
|
|
---
|
|
|
|
<h2>Summary</h2>
|
|
|
|
<div class="markdown-from-sourecode">
|
|
<p><p><code>MenuItem</code> components can be provided to the <a href='menu.html'>Menu</a> by the <code>itemContent</code> function.
|
|
MenuItem's props allow you to display dividers as well as standard items.</p>
|
|
</p>
|
|
</div>
|
|
|
|
<ul>
|
|
</ul>
|
|
|
|
|
|
<h3>Class Properties</h3>
|
|
|
|
<h4 id=propTypes>propTypes <a href="#propTypes" class="link"></a></h4>
|
|
<p><p>React <code>props</code> supported by MenuItem:</p>
|
|
</p>
|
|
<table class="arguments">
|
|
<tr>
|
|
<td style="width:15%;">
|
|
<em>divider</em>
|
|
</td>
|
|
<td>
|
|
<span class="optional">Optional</span>
|
|
<p>Pass a <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean'>Boolean</a> to render the menu item as a section divider.</p>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="width:15%;">
|
|
<em>key</em>
|
|
</td>
|
|
<td>
|
|
<span class="optional">Optional</span>
|
|
<p>Pass a <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string'>String</a> to be the React key to optimize rendering lists of items.</p>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="width:15%;">
|
|
<em>selected</em>
|
|
</td>
|
|
<td>
|
|
<span class="optional">Optional</span>
|
|
<p>Pass a <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean'>Boolean</a> to specify whether the item is selected.</p>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="width:15%;">
|
|
<em>checked</em>
|
|
</td>
|
|
<td>
|
|
<span class="optional">Optional</span>
|
|
<p>Pass a <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean'>Boolean</a> to specify whether the item is checked.</p>
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|