prop to hide displayAs selector

This commit is contained in:
Martti Malmi
2023-11-28 22:16:00 +02:00
parent 1330db056a
commit ad163625c3
4 changed files with 8 additions and 3 deletions

View File

@ -5,9 +5,11 @@ export type DisplayAs = "grid" | "feed";
type DisplaySelectorProps = {
activeSelection: DisplayAs;
onSelect: (display: DisplayAs) => void;
show?: boolean;
};
export const DisplayAsSelector = ({ activeSelection, onSelect }: DisplaySelectorProps) => {
export const DisplayAsSelector = ({ activeSelection, onSelect, show }: DisplaySelectorProps) => {
if (show === false) return null;
return (
<div className="flex mb-4">
<div