0.1.7 • Published 3 years ago

@rootsher/use-sheets-queue v0.1.7

Weekly downloads
10
License
ISC
Repository
-
Last release
3 years ago

@rootsher/use-sheets-queue

npm version npm downloads GitHub issues GitHub PRs ISC license

installation

$ npm install --save @rootsher/use-sheets-queue

demo

usage

  • sheets provider:
import { SheetsProvider } from '@rootsher/use-sheets-queue';

function Main() {
    return (
        <SheetsProvider>
            {/* App */}
        </SheetsProvider>
    );
}
  • sheets management (LIFO - push, pop):
import { useSheetsQueue } from '@rootsher/use-sheets-queue';

import { A } from './sheets';

function App() {
    const [ push ] = useSheetsQueue();
    
    return (
        <Button onClick={() => push(A)}>push</Button>
    );
}

API

type Options = {
    side?: 'left' | 'right' | 'bottom' | 'top';
    size?: number;
};

function push(Element, options?: Options, previousOptions?: Options);
function pop();
0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.0

4 years ago