-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
322 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { PropsWithChildren, useMemo } from 'react'; | ||
import cx from 'classnames'; | ||
|
||
export const IconBtn: React.FC< | ||
PropsWithChildren<{ | ||
disabled?: boolean; | ||
color?: 'green' | 'gray' | 'orange' | 'red' | 'blue'; | ||
className?: string; | ||
onClick?: () => void; | ||
}> | ||
> = ({ color, className, onClick, children, disabled }) => { | ||
const colorClass = useMemo(() => { | ||
switch (color) { | ||
case 'green': | ||
return 'text-green-400 hover:text-green-500'; | ||
case 'gray': | ||
return 'text-gray-400 hover:text-gray-500'; | ||
case 'orange': | ||
return 'text-orange-400 hover:text-orange-500'; | ||
case 'red': | ||
return 'text-red-400 hover:text-red-500'; | ||
case 'blue': | ||
return 'text-blue-400 hover:text-blue-500'; | ||
default: | ||
return ''; | ||
} | ||
}, []); | ||
|
||
if (disabled) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<div | ||
className={cx( | ||
colorClass, | ||
'transition-all duration-500 p-1 flex items-center justify-center hover:bg-slate-200 rounded-none hover:rounded-md text-base bg-slate-100', | ||
className | ||
)} | ||
onClick={onClick} | ||
> | ||
{children} | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { SVGProps } from 'react'; | ||
|
||
export function IcBaselineDeleteOutline(props: SVGProps<SVGSVGElement>) { | ||
return ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="1em" | ||
height="1em" | ||
viewBox="0 0 24 24" | ||
{...props} | ||
> | ||
<path | ||
fill="currentColor" | ||
d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5l-1-1h-5l-1 1H5v2h14V4z" | ||
></path> | ||
</svg> | ||
); | ||
} |
Oops, something went wrong.