File size: 834 Bytes
246d201
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { IoIosArrowForward, IoIosArrowBack } from "react-icons/io";
import { IconButton } from "./icon-button";

interface ToggleWorkspaceIconButtonProps {
  onClick: () => void;
  isHidden: boolean;
}

export function ToggleWorkspaceIconButton({

  onClick,

  isHidden,

}: ToggleWorkspaceIconButtonProps) {
  return (
    <IconButton

      icon={

        isHidden ? (

          <IoIosArrowForward

            size={20}

            className="text-neutral-400 hover:text-neutral-100 transition"

          />

        ) : (

          <IoIosArrowBack

            size={20}

            className="text-neutral-400 hover:text-neutral-100 transition"

          />

        )

      }

      testId="toggle"

      ariaLabel={isHidden ? "Open workspace" : "Close workspace"}

      onClick={onClick}

    />
  );
}