Created
January 20, 2019 12:10
-
-
Save DmitryMarkov/89065a74b9d396f1ec37e0c93ddb38d0 to your computer and use it in GitHub Desktop.
Selector.js
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
const Selector = ({ folders }) => ( | |
<form> | |
<label for="example">Select folder</label> | |
<select class="form-control" id="example"> | |
<TreeComponent folders={folders}> | |
{({ folder: { id, name } }) => (<option key={id}>{name}</option>)} | |
</TreeComponent> | |
</select> | |
</form> | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment