Skip to content

Commit

Permalink
fix(app): update software keyboard ref type (#14860)
Browse files Browse the repository at this point in the history
* fix(app): update software keyboard ref type
  • Loading branch information
koji authored Apr 12, 2024
1 parent aba93f1 commit b0fb14f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import * as React from 'react'
import Keyboard from 'react-simple-keyboard'
import { alphanumericKeyboardLayout, customDisplay } from '../constants'
import type { KeyboardReactInterface } from 'react-simple-keyboard'

import '../index.css'
import './index.css'

// TODO (kk:04/05/2024) add debug to make debugging easy
interface AlphanumericKeyboardProps {
onChange: (input: string) => void
keyboardRef: React.MutableRefObject<any>
keyboardRef: React.MutableRefObject<KeyboardReactInterface | null>
debug?: boolean
}

Expand Down
3 changes: 2 additions & 1 deletion app/src/atoms/SoftwareKeyboard/FullKeyboard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import * as React from 'react'
import { KeyboardReact as Keyboard } from 'react-simple-keyboard'
import { customDisplay, fullKeyboardLayout } from '../constants'
import type { KeyboardReactInterface } from 'react-simple-keyboard'

import '../index.css'
import './index.css'

// TODO (kk:04/05/2024) add debug to make debugging easy
interface FullKeyboardProps {
onChange: (input: string) => void
keyboardRef: React.MutableRefObject<any>
keyboardRef: React.MutableRefObject<KeyboardReactInterface | any>
debug?: boolean
}

Expand Down
4 changes: 2 additions & 2 deletions app/src/atoms/SoftwareKeyboard/IndividualKey/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'
import { KeyboardReact as Keyboard } from 'react-simple-keyboard'

import type { KeyboardReactInterface } from 'react-simple-keyboard'
import '../index.css'
import './index.css'

Expand All @@ -11,7 +11,7 @@ const customDisplay = {
// TODO (kk:04/05/2024) add debug to make debugging easy
interface IndividualKeyProps {
onChange: (input: string) => void
keyboardRef: React.MutableRefObject<null>
keyboardRef: React.MutableRefObject<KeyboardReactInterface | null>
keyText: string
debug?: boolean
}
Expand Down
4 changes: 3 additions & 1 deletion app/src/atoms/SoftwareKeyboard/NumericalKeyboard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import * as React from 'react'
import { KeyboardReact as Keyboard } from 'react-simple-keyboard'
import { numericalKeyboardLayout, numericalCustom } from '../constants'

import type { KeyboardReactInterface } from 'react-simple-keyboard'
import '../index.css'
import './index.css'

// Note (kk:04/05/2024) add debug to make debugging easy
interface NumericalKeyboardProps {
onChange: (input: string) => void
keyboardRef: React.MutableRefObject<null>
keyboardRef: React.MutableRefObject<KeyboardReactInterface | null>
isDecimal?: boolean
hasHyphen?: boolean
debug?: boolean
Expand Down

0 comments on commit b0fb14f

Please sign in to comment.