diff --git a/src/custom-components/ReorderableList.tsx b/src/custom-components/ReorderableList.tsx index 21ab60f..93e3b97 100644 --- a/src/custom-components/ReorderableList.tsx +++ b/src/custom-components/ReorderableList.tsx @@ -1,6 +1,7 @@ import { Fragment, JSXElementConstructor, ReactElement, useState } from "react" import { FaEllipsisH } from "react-icons/fa" import { DialogButton, Field, Focusable, GamepadButton } from "../deck-components" +import { IconType } from "react-icons" export type ReorderableEntry = { label: string, @@ -12,7 +13,8 @@ type ListProps = { entries: ReorderableEntry[], onAction: (entryReference: ReorderableEntry) => void, onSave: (entries: ReorderableEntry[]) => void, - secondButton?: JSXElementConstructor<{entry:ReorderableEntry}> + secondButton?: JSXElementConstructor<{entry:ReorderableEntry}>, + primaryIcon?:IconType } /** @@ -61,7 +63,7 @@ export function ReorderableList(props: ListProps) { onClick={toggleReorderEnabled}> { entryList.map((entry: ReorderableEntry) => ( - + {props.secondButton ? : null} )) @@ -78,7 +80,8 @@ type ListEntryProps = { reorderEntryFunc: CallableFunction, reorderEnabled: boolean, onAction: (entryReference: ReorderableEntry) => void, - children:ReactElement|null + children:ReactElement|null, + primaryIcon: IconType } function ReorderableItem(props: ListEntryProps) { @@ -125,7 +128,7 @@ function ReorderableItem(props: ListEntryProps) { {props.children} props.onAction(props.entryData)} onOKButton={() => props.onAction(props.entryData)}> - +