react-minibar
react-minibar (https://dioklecijan.github.io/react-minibar/)
Requirements
This lib uses react hooks which means you need react
and react-dom
version 16.8.0-alpha1
or higher.
Install
npm install --save react-minibar
Usage
Define minibar theme in app css file:
Create minibar with tab and/or command parts:
import React Component from 'react'import Minibar Tabs Cmds from 'react-minibar'; const tabs = label: 'This is tab 1' tooltip: 'Tab 1\tCtrl+1' label: 'This is tab 2' custom: 'my custom prop' label: 'Switch theme' ; // if font-awesome is in use:const cmds = icon: 'fas fa-plus' tooltip: 'New command' icon: 'fas fa-trash-alt' tooltip: 'Clear output' icon: 'fas fa-chevron-up' tooltip: 'Maximize pane' tooltip: 'missing icon' icon: 'fas fa-times' tooltip: 'Close minibar' ; { console; } { console;} { return <div> <Minibar> <Tabs = = /> <Cmds = = /> </Minibar> <main ="main"> other things </main> </div> ; }
A complete example app with multiple themes is in example
directory:
npm run example
License
MIT © dioklecijan