Skip to content

Commit

Permalink
chore: add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-y-ito committed Dec 14, 2023
1 parent 267064f commit 59e4d7c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/ui/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* This file is based on the Button component from shadcn and customized for our needs.
*
* See the official docs for more info:
* shadcn/ui: https://ui.shadcn.com/docs/components/button
*/
import { cn } from '@/lib/tailwind/utils';

import { Slot } from '@radix-ui/react-slot';
Expand Down
7 changes: 7 additions & 0 deletions src/components/ui/Label.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* This file is based on the Label component from shadcn and customized for our needs.
*
* See the official docs for more info:
* shadcn/ui: https://ui.shadcn.com/docs/components/label
* Radix UI: https://www.radix-ui.com/primitives/docs/components/label
*/
import { cn } from '@/lib/tailwind/utils';

import { Root as PrimitiveRoot } from '@radix-ui/react-label';
Expand Down
12 changes: 12 additions & 0 deletions src/components/ui/SelectionDrawer/SelectionDrawerButton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* This file is based on the Button component from shadcn and customized for our needs.
*
* See the official docs for more info:
* shadcn/ui: https://ui.shadcn.com/docs/components/button
*/
import { cn } from '@/lib/tailwind/utils';

import { Slot } from '@radix-ui/react-slot';
Expand Down Expand Up @@ -32,6 +38,9 @@ interface ISelectionDrawerIconProps {
className?: string;
}

/**
* This is a custom component that we use to wrap the Icon in the button.
*/
const SelectionDrawerButtonIcon = forwardRef<HTMLDivElement, ISelectionDrawerIconProps>(
({ children, className }, ref) => {
return (
Expand All @@ -51,6 +60,9 @@ interface ISelectionDrawerLabelProps {
className?: string;
}

/**
* This is a custom component that we use to wrap the text in the button.
*/
const SelectionDrawerButtonText = forwardRef<HTMLSpanElement, ISelectionDrawerLabelProps>(
({ children, className }, ref) => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* This file is based on the Radio Group component from shadcn and customized for our needs.
*
* See the official docs for more info:
* shadcn/ui:https://ui.shadcn.com/docs/components/radio-group
* Radix UI: https://www.radix-ui.com/primitives/docs/components/radio-group
*/
import { cn } from '@/lib/tailwind/utils';

import {
Expand Down

0 comments on commit 59e4d7c

Please sign in to comment.