mirror of
https://github.com/streamich/react-use.git
synced 2026-01-25 14:17:16 +00:00
More DRY code. Also move non-hooks to separate directories. BREAKING CHANGE: all `create*` factories been moved to `factory` subdirectory and in case direct import should be imported like `react-use/esm/factory/createBreakpoint` BREAKING CHANGE: `comps` directory renamed to `component`
11 lines
286 B
TypeScript
11 lines
286 B
TypeScript
import { storiesOf } from '@storybook/react';
|
|
import * as React from 'react';
|
|
import UseKey from '../../src/component/UseKey';
|
|
|
|
storiesOf('Components/<UseKey>', module).add('Demo', () => (
|
|
<div>
|
|
Press "q" key!
|
|
<UseKey filter="q" fn={() => alert('Q pressed!')} />
|
|
</div>
|
|
));
|