ngneat/hotkeys

Dependency free help modal?

Closed this issue · 5 comments

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[ ] Feature request?
[ ] Documentation issue or request?
[ ] Support request
[x] Other: Question to document or support

Current behavior

The documentation for the help modal relies on MatDialog dependency:

this.hotkeys.registerHelpModal(() => {
  const ref = this.dialog.open(HotkeysHelpComponent, { width: '500px' });
  ref.componentInstance.dismiss.subscribe(() => ref.close());
});

Expected behavior

It would be nice if it was possible to have a help modal without the need to install extra dependencies

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Environment


Angular version: X.Y.Z


Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

+1

You're welcome to create a PR

I ended up making my own package, mostly because of #81 but also wanting to solve it a bit different

I ended up making my own package, mostly because of #81 but also wanting to solve it a bit different

Do you have a link for the package or fork ? and do you mind sharing what change you made different ?

Cool, so closing the issue.