reorganization to support SSR for component library in docusaurus
This commit is contained in:
1 parent
31e3e03490
commit
97805df68c
35 files changed
+1240
-304
No files matched your search
@@ -1,14 +1,10 @@
|
||||
import React from 'react';
|
||||
import React, { useEffect } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { hotkeys } from '@ohif/core';
|
||||
import Input from '../Input';
|
||||
|
||||
import { hotkeys } from '../../utils/'
|
||||
import { getKeys, formatKeysForInput } from './utils';
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* HotkeyField
|
||||
* Renders a hotkey input that records keys
|
||||
@@ -23,6 +19,10 @@ import { getKeys, formatKeysForInput } from './utils';
|
||||
const HotkeyField = ({ disabled, keys, onChange, className, modifierKeys }) => {
|
||||
const inputValue = formatKeysForInput(keys);
|
||||
|
||||
useEffect(() => {
|
||||
hotkeys.initialize();
|
||||
}, [])
|
||||
|
||||
const onInputKeyDown = event => {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
||||
Reference in new issue
Block a user