diff --git a/client/src/components/app-bar/FeaturePicker.tsx b/client/src/components/app-bar/FeaturePicker.tsx index 13b9236f..6a175fa8 100644 --- a/client/src/components/app-bar/FeaturePicker.tsx +++ b/client/src/components/app-bar/FeaturePicker.tsx @@ -5,7 +5,7 @@ import { Space } from "components/generic/Space"; import { find, map, startCase, truncate } from "lodash"; import { FeatureDescriptor } from "protocol/FeatureQuery"; import { ReactElement, ReactNode, cloneElement } from "react"; -import { AccentColor, getShade } from "theme"; +import { AccentColor, getShade, usePaper } from "theme"; import { FeaturePickerButton } from "./FeaturePickerButton"; export type Props = { @@ -15,11 +15,12 @@ export type Props = { onChange?: (key: string) => void; items?: (FeatureDescriptor & { icon?: ReactNode; color?: AccentColor })[]; icon?: ReactNode; - showArrow?: boolean; + arrow?: boolean; disabled?: boolean; ButtonProps?: ButtonProps; itemOrientation?: "vertical" | "horizontal"; ellipsis?: number; + paper?: boolean; }; export function FeaturePicker({ @@ -28,13 +29,15 @@ export function FeaturePicker({ onChange, items, icon, - showArrow, + arrow, disabled, ButtonProps, showTooltip, itemOrientation = "horizontal", ellipsis = Infinity, + paper: _paper, }: Props) { + const paper = usePaper(); const { palette } = useTheme(); const getIcon = (icon: ReactNode, color?: AccentColor) => @@ -54,9 +57,10 @@ export function FeaturePicker({ {truncate(selected?.name ?? label, { length: ellipsis })} diff --git a/client/src/components/app-bar/FeaturePickerButton.tsx b/client/src/components/app-bar/FeaturePickerButton.tsx index 8eecd98e..2adb8eef 100644 --- a/client/src/components/app-bar/FeaturePickerButton.tsx +++ b/client/src/components/app-bar/FeaturePickerButton.tsx @@ -5,9 +5,9 @@ import { Props } from "./FeaturePicker"; export function FeaturePickerButton({ children, icon, - showArrow, + arrow, ...props -}: ButtonProps & Pick) { +}: ButtonProps & Pick) { return (