UNPKG

accessible-react-checkbox-group

Version:
764 lines (212 loc) 9.22 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Global</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Global</h1> <section> <header> <h2></h2> </header> <article> <div class="container-overview"> <dl class="details"> </dl> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="extractContext"><span class="type-signature"></span>extractContext<span class="signature">(contextValue, checkboxValue, props)</span><span class="type-signature"> &rarr; {<a href="global.html#ExtractedContext">ExtractedContext</a>}</span></h4> <div class="description"> Extracts checkbox group context information for a given checkbox value into a normal props object. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>contextValue</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last">The context information to extract.</td> </tr> <tr> <td class="name"><code>checkboxValue</code></td> <td class="type"> <span class="param-type"><a href="global.html#CheckboxValue">CheckboxValue</a></span> </td> <td class="description last">The value of the checkbox to extract context for.</td> </tr> <tr> <td class="name"><code>props</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last">Normal props to pass to the individual checkbox.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="index.js.html">index.js</a>, <a href="index.js.html#line32">line 32</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="global.html#ExtractedContext">ExtractedContext</a></span> </dd> </dl> <h3 class="subsection-title">Type Definitions</h3> <h4 class="name" id="CheckboxOptions">CheckboxOptions</h4> <h5>Type:</h5> <ul> <li> <span class="param-type">Object</span> </li> </ul> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>checked</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> &lt;nullable><br> </td> <td class="description last">Whether or not the checkbox is checked.</td> </tr> <tr> <td class="name"><code>indeterminate</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> &lt;nullable><br> </td> <td class="description last">Whether or not the checkbox is indeterminate.</td> </tr> <tr> <td class="name"><code>onChange</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="attributes"> &lt;nullable><br> </td> <td class="description last">The function to call when the checkbox input changes state.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="index.js.html">index.js</a>, <a href="index.js.html#line10">line 10</a> </li></ul></dd> </dl> <h4 class="name" id="CheckboxValue">CheckboxValue</h4> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> | <span class="param-type">number</span> | <span class="param-type">boolean</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="index.js.html">index.js</a>, <a href="index.js.html#line6">line 6</a> </li></ul></dd> </dl> <h4 class="name" id="ExtractedContext">ExtractedContext</h4> <h5>Type:</h5> <ul> <li> <span class="param-type">Object</span> </li> </ul> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">The name of the checkbox group.</td> </tr> <tr> <td class="name"><code>options</code></td> <td class="type"> <span class="param-type"><a href="global.html#CheckboxOptions">CheckboxOptions</a></span> </td> <td class="description last">The natural attributes of a checkbox input.</td> </tr> <tr> <td class="name"><code>props</code></td> <td class="type"> <span class="param-type">*</span> </td> <td class="description last">Any additional props to pass to a checkbox input.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="index.js.html">index.js</a>, <a href="index.js.html#line17">line 17</a> </li></ul></dd> </dl> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="PreContextualizedCheckbox.html">PreContextualizedCheckbox</a></li></ul><h3>Global</h3><ul><li><a href="global.html#extractContext">extractContext</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Jun 06 2018 14:47:34 GMT-0400 (Eastern Daylight Time) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>