From d24136ecb6b0c5239b68723e8f92a4822aa7b590 Mon Sep 17 00:00:00 2001 From: Jozen Blue Martinez Date: Sun, 11 Dec 2022 22:45:40 +0800 Subject: [PATCH] fix(FooterLegend): change description types to ReactNode (#62) --- src/deck-components/FooterLegend.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/deck-components/FooterLegend.ts b/src/deck-components/FooterLegend.ts index cc400cd..a9a67ad 100644 --- a/src/deck-components/FooterLegend.ts +++ b/src/deck-components/FooterLegend.ts @@ -1,3 +1,5 @@ +import { ReactNode } from 'react'; + export enum GamepadButton { INVALID, OK, @@ -42,16 +44,16 @@ export interface GamepadEventDetail { source: number; } export declare type ActionDescriptionMap = { - [key in GamepadButton]?: string + [key in GamepadButton]?: ReactNode } export declare type GamepadEvent = CustomEvent; export interface FooterLegendProps { actionDescriptionMap?: ActionDescriptionMap; - onOKActionDescription?: string; - onCancelActionDescription?: string; - onSecondaryActionDescription?: string; - onOptionsActionDescription?: string; - onMenuActionDescription?: string; + onOKActionDescription?: ReactNode; + onCancelActionDescription?: ReactNode; + onSecondaryActionDescription?: ReactNode; + onOptionsActionDescription?: ReactNode; + onMenuActionDescription?: ReactNode; onButtonDown?: (evt: GamepadEvent) => void; onButtonUp?: (evt: GamepadEvent) => void; onOKButton?: (evt: GamepadEvent) => void;