plane/apps/app/components/onboarding/tour/sidebar.tsx
Aaryan Khandelwal a1b09fcbc6
style: onboarding screens (#1412)
* style: new onboarding screens

* chore: onboarding tour screens

* fix: build error

* fix: build errors

* style: default layout background

* chor: update user auth hook logic, style: new onboarding screens

* fix: component structure

* chore: tab responsiveness added

* fix: redirection logic

* style: welcome screens responsiveness

* chore: update workspace url input field

* style: mobile responsiveness added

* chore: complete onboarding workflow

* style: create workspace page design update

* style: workspace invitations page design update

* chore: update steps logic

* fix: step change logic

* style: tour steps
2023-07-12 19:55:08 +05:30

71 lines
1.8 KiB
TypeScript

// icons
import { ContrastIcon, LayerDiagonalIcon, PeopleGroupIcon, ViewListIcon } from "components/icons";
import { DocumentTextIcon } from "@heroicons/react/24/outline";
// types
import { TTourSteps } from "./root";
const sidebarOptions: {
key: TTourSteps;
icon: any;
}[] = [
{
key: "issues",
icon: LayerDiagonalIcon,
},
{
key: "cycles",
icon: ContrastIcon,
},
{
key: "modules",
icon: PeopleGroupIcon,
},
{
key: "views",
icon: ViewListIcon,
},
{
key: "pages",
icon: DocumentTextIcon,
},
];
type Props = {
step: TTourSteps;
setStep: React.Dispatch<React.SetStateAction<TTourSteps>>;
};
export const TourSidebar: React.FC<Props> = ({ step, setStep }) => (
<div className="hidden lg:block col-span-3 p-8 bg-custom-background-90">
<h3 className="font-medium text-lg">
Let{"'"}s get started!
<br />
Get more out of Plane.
</h3>
<div className="mt-8 space-y-5">
{sidebarOptions.map((option) => (
<h5
key={option.key}
className={`pr-2 py-0.5 pl-3 flex items-center gap-2 capitalize font-medium text-sm border-l-[3px] cursor-pointer ${
step === option.key
? "text-custom-primary-100 border-custom-primary-100"
: "text-custom-text-200 border-transparent"
}`}
onClick={() => setStep(option.key)}
>
<option.icon
className={`h-5 w-5 flex-shrink-0 ${
step === option.key ? "text-custom-primary-100" : "text-custom-text-200"
}`}
color={`${
step === option.key ? "rgb(var(--color-primary-100))" : "rgb(var(--color-text-200))"
}`}
aria-hidden="true"
/>
{option.key}
</h5>
))}
</div>
</div>
);