about summary refs log tree commit diff
path: root/src/components/Sidebar/SidebarButton.tsx
blob: efcb163c519f9d22ed959a8bb1fa7d43ad3acd30 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
export default function SidebarButton(props: any) {
  let buttonStyle = "flex items-center w-full p-3 leading-tight transition-all rounded-lg outline-none text-start hover:bg-blue-500"

  if (props.name === props.currentPage) {
    buttonStyle += " border-2 border-black"
  }

  return (
    <div role="button"
      className={buttonStyle}>
      <div className="grid mr-4 place-items-center">
        <i className={props.icon}></i>
      </div>
      <a href={props.href}>{props.name}</a>
    </div>
  )
}