-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEAT] Icon Component #30
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -5,6 +5,7 @@ import { signInWithGoogle } from '@/lib/auth/actions' | |||||||||||||||||
import { Generic } from '@/types/global' | ||||||||||||||||||
import { tw } from '@/lib/utils/tw' | ||||||||||||||||||
import React from 'react' | ||||||||||||||||||
import Icon from '@/modules/common/templates/icon' | ||||||||||||||||||
|
||||||||||||||||||
const AccountSignInButton: React.FC<Generic> = ({ className }) => | ||||||||||||||||||
{ | ||||||||||||||||||
|
@@ -17,13 +18,7 @@ const AccountSignInButton: React.FC<Generic> = ({ className }) => | |||||||||||||||||
className | ||||||||||||||||||
)} | ||||||||||||||||||
> | ||||||||||||||||||
<UserCircleIcon | ||||||||||||||||||
aria-hidden="true" | ||||||||||||||||||
className={tw( | ||||||||||||||||||
"size-6 flex-shrink-0", | ||||||||||||||||||
"text-light-secondary dark:text-dark-secondary group-hover:text-light-text/60 dark:group-hover:text-dark-text/60" | ||||||||||||||||||
)} | ||||||||||||||||||
/> | ||||||||||||||||||
<Icon icon={<UserCircleIcon />} /> | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You forgot to put back the classes that already had the icon before.
Suggested change
|
||||||||||||||||||
</button> | ||||||||||||||||||
</form> | ||||||||||||||||||
) | ||||||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -6,6 +6,7 @@ import DropdownItem from '../components/dropdown-item' | |||||||||||||||||
import { DropdownProps } from '@/types/templates' | ||||||||||||||||||
import React, { useState } from 'react' | ||||||||||||||||||
import { tw } from '@/lib/utils/tw' | ||||||||||||||||||
import Icon from './icon' | ||||||||||||||||||
|
||||||||||||||||||
const Dropdown: React.FC<DropdownProps> = ({ options, label, className, children, onSelect }) => | ||||||||||||||||||
{ | ||||||||||||||||||
|
@@ -31,12 +32,7 @@ const Dropdown: React.FC<DropdownProps> = ({ options, label, className, children | |||||||||||||||||
> | ||||||||||||||||||
{label} | ||||||||||||||||||
{children} | ||||||||||||||||||
<ChevronRightIcon | ||||||||||||||||||
className={tw( | ||||||||||||||||||
"text-light-text dark:text-dark-text size-4 transition-transform duration-200", | ||||||||||||||||||
{ "rotate-90": isOpen } | ||||||||||||||||||
)} | ||||||||||||||||||
/> | ||||||||||||||||||
<Icon icon={ChevronRightIcon} className="w-4 h-4" /> | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You forgot to put back the classes that already had the icon before. Remember that you have to pass a created object, however, you are passing an unbuilt object, use
Suggested change
|
||||||||||||||||||
</MenuButton> | ||||||||||||||||||
|
||||||||||||||||||
<MenuItems | ||||||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,21 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
'use client' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
import { tw } from "@/lib/utils/tw"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
import { IconProps } from "@/types/templates"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
import React from "react"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
const Icon: React.FC<IconProps> = ({ className, icon }) => | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<span | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
className={tw( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"font-bold size-4", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"text-light-text dark:text-dark-text", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
className | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
)}> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{icon} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</span> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
export default Icon; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+1
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You must maintain a similar structure to the rest of the project, making use of
Suggested change
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You must maintain an order in the imports based on their size.