Skip to content

Commit

Permalink
feat(Focusable): add FooterLegend props to Focusable and Field
Browse files Browse the repository at this point in the history
  • Loading branch information
AAGaming00 committed Aug 26, 2022
1 parent ef147c6 commit c25fe58
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/deck-components/Field.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { FC, HTMLAttributes, ReactNode, RefAttributes } from 'react';
import { findModuleChild } from '../webpack';
import { FooterLegendProps } from './FooterLegend';

export interface FieldProps extends HTMLAttributes<HTMLDivElement> {
export interface FieldProps extends HTMLAttributes<HTMLDivElement>, FooterLegendProps {
label?: string | ReactNode;
bottomSeparator?: boolean;
description?: string | ReactNode;
Expand Down
3 changes: 2 additions & 1 deletion src/deck-components/Focusable.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { HTMLAttributes, ReactNode, RefAttributes, VFC } from "react";
import { findModuleChild } from "../webpack";
import { FooterLegendProps } from "./FooterLegend";

export interface FocusableProps extends HTMLAttributes<HTMLDivElement> {
export interface FocusableProps extends HTMLAttributes<HTMLDivElement>, FooterLegendProps {
children: ReactNode;
"flow-children"?: string;
focusClassName?: string;
Expand Down
18 changes: 18 additions & 0 deletions src/deck-components/FooterLegend.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export interface FooterLegendProps {
actionDescriptionMap?: unknown;
onOKActionDescription?: string;
onCancelActionDescription?: string;
onSecondaryActionDescription?: string;
onOptionsActionDescription?: string;
onMenuActionDescription?: string;
onButtonDown?: () => void;
onButtonUp?: () => void;
onOKButton?: () => void;
onCancelButton?: () => void;
onSecondaryButton?: () => void;
onOptionsButton?: () => void;
onGamepadDirection?: () => void;
onGamepadFocus?: () => void;
onGamepadBlur?: () => void;
onMenuButton?: () => void;
}
1 change: 1 addition & 0 deletions src/deck-components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export * from './Carousel';
export * from './Dropdown';
export * from './Field';
export * from './Focusable';
export * from './FooterLegend';
export * from './Menu';
export * from './Modal';
export * from './Panel';
Expand Down

0 comments on commit c25fe58

Please sign in to comment.