https://github.com/nteract/dropdown-menu
A React component for rendering dropdown menus
https://github.com/nteract/dropdown-menu
Last synced: 10 months ago
JSON representation
A React component for rendering dropdown menus
- Host: GitHub
- URL: https://github.com/nteract/dropdown-menu
- Owner: nteract
- License: bsd-3-clause
- Created: 2020-03-12T21:55:28.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T21:26:36.000Z (about 3 years ago)
- Last Synced: 2025-01-05T03:42:13.380Z (12 months ago)
- Language: TypeScript
- Size: 641 KB
- Stars: 0
- Watchers: 13
- Forks: 2
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @nteract/dropdown-menu
This package contains a React component for rendering the drop-down element on a single cell. This drop-down provides users with the ability to hide and show cells, convert cells between different types, and more.
## Installation
```
$ yarn add @nteract/dropdown-menu
```
```
$ npm install --save @nteract/dropdown-menu
```
## Usage
The example below showcases how we can use the components within this package to create a drop-down menu with actions specific to code cells.
```javascript
import {
DropdownMenu,
DropdownTrigger,
DropdownContent
} from "@nteract/dropdown-menu";
export default () => {
return (
{type === "code" ? (
Clear Cell Output
Toggle Input Visibility
) : null}
);
};
```
## Documentation
We're working on adding more documentation for this component. Stay tuned by watching this repository!
## Support
If you experience an issue while using this package or have a feature request, please file an issue on the [issue board](https://github.com/nteract/nteract/issues/new/choose) and add the `pkg:dropdown-menu` label.
## License
[BSD-3-Clause](https://choosealicense.com/licenses/bsd-3-clause/)