@@ -12,7 +12,7 @@ import type { DefaultKeyboardDisplayIcons } from '../icons';
1212
1313export interface DefaultKeyboardDisplayProps
1414 extends Omit < PrimitivePropsWithRef < 'div' > , 'disabled' > {
15- icons : DefaultKeyboardDisplayIcons ;
15+ icons : Partial < DefaultKeyboardDisplayIcons > ;
1616}
1717
1818const DefaultKeyboardDisplay = React . forwardRef < HTMLElement , DefaultKeyboardDisplayProps > (
@@ -54,7 +54,7 @@ const DefaultKeyboardDisplay = React.forwardRef<HTMLElement, DefaultKeyboardDisp
5454 } ;
5555 } , [ $lastKeyboardAction ] ) ;
5656
57- return (
57+ return Icon ? (
5858 < Primitive . div
5959 { ...props }
6060 className = { className }
@@ -65,14 +65,12 @@ const DefaultKeyboardDisplay = React.forwardRef<HTMLElement, DefaultKeyboardDisp
6565 < div className = "vds-kb-text" > { $text } </ div >
6666 </ div >
6767 < div className = "vds-kb-bezel" key = { count } >
68- { Icon ? (
69- < div className = "vds-kb-icon" >
70- < Icon />
71- </ div >
72- ) : null }
68+ < div className = "vds-kb-icon" >
69+ < Icon />
70+ </ div >
7371 </ div >
7472 </ Primitive . div >
75- ) ;
73+ ) : null ;
7674 } ,
7775) ;
7876
@@ -98,7 +96,7 @@ function getVolumeText(volume: number, gain: number) {
9896 return `${ Math . round ( volume * gain * 100 ) } %` ;
9997}
10098
101- function getIcon ( Icons : DefaultKeyboardDisplayIcons ) {
99+ function getIcon ( Icons : Partial < DefaultKeyboardDisplayIcons > ) {
102100 const { $state } = useContext ( mediaContext ) ,
103101 action = $state . lastKeyboardAction ( ) ?. action ;
104102 switch ( action ) {
0 commit comments