generated from nhcarrigan/template
feat: add show/hide locked toggle to all panels
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
interface LockToggleProps {
|
||||
showLocked: boolean;
|
||||
onToggle: () => void;
|
||||
lockedCount: number;
|
||||
}
|
||||
|
||||
export const LockToggle = ({
|
||||
showLocked,
|
||||
onToggle,
|
||||
lockedCount,
|
||||
}: LockToggleProps): React.JSX.Element => (
|
||||
<button
|
||||
className={`lock-toggle ${showLocked ? "lock-toggle-on" : "lock-toggle-off"}`}
|
||||
onClick={onToggle}
|
||||
title={showLocked ? "Hide locked items" : "Show locked items"}
|
||||
type="button"
|
||||
>
|
||||
{showLocked ? "🔓" : "🔒"} {showLocked ? "Hide" : "Show"} locked ({lockedCount})
|
||||
</button>
|
||||
);
|
||||
Reference in New Issue
Block a user