0.1.0-alpha.4 • Published 3 years ago
cmd-pal-test v0.1.0-alpha.4
cmd-pal
Install
# npm
npm install cmd-pal --save-dev
# yarn
yarn add cmd-pal --dev
Usage
import { ClassicTheme, Palette, SingleOption } from 'cmd-pal';
// ...
ReactDOM.render(
<>
<App />
<Palette
components={ClassicTheme.components}
openOn="option+shift+p"
prompts={[
<SingleOption
options={[
{
label: 'Hello world',
resolve() {
alert('Hello world');
},
},
// ...
]}
/>
]}
/>
</>,
root,
);