Skip to content

Commit

Permalink
fix: rename label popover to icon label popover for more specific name
Browse files Browse the repository at this point in the history
Signed-off-by: bunsy-0900 <[email protected]>
  • Loading branch information
bunsy-0900 committed Jan 18, 2024
1 parent 894f63b commit b7d5e87
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import {
PopoverTrigger,
} from "./ui/popover";

interface LabelPopoverProps {
interface IconLabelPopoverProps {
icon: React.ReactNode;
children: React.ReactNode;
}

export const LabelPopover = ({ icon, children }: LabelPopoverProps) => {
export const IconLabelPopover = ({ icon, children }: IconLabelPopoverProps) => {
return (
<>
<div className="flex items-center sm:hidden">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useFormContext, UseFormReturn } from "react-hook-form";
import { Trans, useTranslation } from "react-i18next";
import { useLocation } from "react-router-dom";

import { LabelPopover } from "~components/label-popover";
import { IconLabelPopover } from "~components/icon-label-popover";
import { ActionMessage } from "~components/ui/action-message";
import { Button } from "~components/ui/button";
import {
Expand Down Expand Up @@ -167,7 +167,7 @@ export const ResetPassword = ({ methods, settings }: ResetPasswordProps) => {
<div className="space-y-2">
<div className="flex items-center gap-1">
<FormLabel>{t("new_password")}</FormLabel>
<LabelPopover
<IconLabelPopover
icon={
<Icons.info
className="m-1 h-4 w-4 cursor-pointer sm:h-3 sm:w-3"
Expand All @@ -182,7 +182,7 @@ export const ResetPassword = ({ methods, settings }: ResetPasswordProps) => {
li: <li />,
}}
/>
</LabelPopover>
</IconLabelPopover>
</div>
<FormControl>
<Input
Expand Down
10 changes: 5 additions & 5 deletions signup-ui/src/pages/SignUpPage/AccountSetup/AccountSetup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { KeyboardEvent, useCallback, useMemo, useState } from "react";
import { UseFormReturn } from "react-hook-form";
import { Trans, useTranslation } from "react-i18next";

import { LabelPopover } from "~components/label-popover";
import { IconLabelPopover } from "~components/icon-label-popover";
import { Button } from "~components/ui/button";
import { Checkbox } from "~components/ui/checkbox";
import {
Expand Down Expand Up @@ -188,7 +188,7 @@ export const AccountSetup = ({ settings, methods }: AccountSetupProps) => {
<div className="space-y-2">
<div className="flex items-center gap-1">
<FormLabel>{t("full_name")}</FormLabel>
<LabelPopover
<IconLabelPopover
icon={
<Icons.info
className="m-1 h-4 w-4 cursor-pointer sm:h-3 sm:w-3"
Expand All @@ -197,7 +197,7 @@ export const AccountSetup = ({ settings, methods }: AccountSetupProps) => {
}
>
<span>{t("full_name_tooltip")}</span>
</LabelPopover>
</IconLabelPopover>
</div>
<FormControl>
<Input
Expand Down Expand Up @@ -229,7 +229,7 @@ export const AccountSetup = ({ settings, methods }: AccountSetupProps) => {
<div className="space-y-2">
<div className="flex items-center gap-1">
<FormLabel>{t("password")}</FormLabel>
<LabelPopover
<IconLabelPopover
icon={
<Icons.info
className="m-1 h-4 w-4 cursor-pointer sm:h-3 sm:w-3"
Expand All @@ -244,7 +244,7 @@ export const AccountSetup = ({ settings, methods }: AccountSetupProps) => {
li: <li />,
}}
/>
</LabelPopover>
</IconLabelPopover>
</div>
<FormControl>
<Input
Expand Down

0 comments on commit b7d5e87

Please sign in to comment.