Skip to content

Commit

Permalink
Merge pull request #9 from RP-IV-GP2/feature/imageUpload
Browse files Browse the repository at this point in the history
better image upload
  • Loading branch information
fell-lucas authored Apr 4, 2021
2 parents fdaaba0 + 70a2e22 commit fb03bbb
Show file tree
Hide file tree
Showing 7 changed files with 216 additions and 33 deletions.
94 changes: 94 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"yup": "^0.32.9"
},
"scripts": {
"start": "BROWSER=none craco start",
"start": "BROWSER=vivaldi-stable craco start",
"build": "craco build",
"test": "craco test",
"eject": "react-scripts eject"
Expand Down
7 changes: 3 additions & 4 deletions src/components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ import { ButtonHTMLAttributes } from "react";
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
children: React.ReactChild;
color?: string;
hover?: string;
}

export function Button({ children, color, className, ...rest }: ButtonProps) {
export function Button({ children, color, hover, className, ...rest }: ButtonProps) {
return (
<button
className={`flex py-2 px-4 transition duration-150 ease-in-out
hover:bg-opacity-70 bg-${color ?? "red"}-200 dark:bg-${color ?? "red"}-400
rounded-lg h-10 dark:text-white ${className}`}
className={`flex py-2 px-4 transition duration-150 ease-in-out ${hover ? `hover:bg-${hover}-400 dark:hover:bg-${hover}-500` : 'hover:bg-opacity-70'} bg-${color ?? "red"}-200 dark:bg-${color ?? "red"}-400 rounded-lg h-10 dark:text-white ${className}`}
{...rest}
>
<p className="flex gap-2 items-center flex-1 justify-center">{children}</p>
Expand Down
Loading

0 comments on commit fb03bbb

Please sign in to comment.