-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CSS updates to fix viewport height & refactor form (#58)
* make bottom nav position fix * create generic button component to refactor * use min-h-screen and flex spacing to fix mobile issues in form * no need for flex-1 * allow all image types and remove z-index * update css in summary to fit mobile view better * useResizeWindow should fire on mount * refactor form submit to use store getter * refactor and update csss * update css * add border * update css padding
- Loading branch information
1 parent
65b2b61
commit 0d8c945
Showing
11 changed files
with
128 additions
and
93 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
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
41 changes: 14 additions & 27 deletions
41
packages/client/lib/components/ReportForm/NavigationButtons/SubmitReportForm.jsx
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,29 @@ | ||
import { SVGIcon } from './icons/SVGIcon'; | ||
|
||
const BUTTON_TYPE_CLASSES_MAP = { | ||
neutral: 'bg-background text-foreground', | ||
positive: 'bg-positive text-background', | ||
negative: 'bg-negative text-background', | ||
}; | ||
|
||
export const Button = ({ | ||
children, | ||
handleClick, | ||
iconName, | ||
buttonType = 'neutral', | ||
...rest | ||
}) => { | ||
const buttonClasses = BUTTON_TYPE_CLASSES_MAP[buttonType]; | ||
|
||
return ( | ||
<button | ||
className={`flex w-full items-center justify-center rounded-2xl border px-3.5 py-2 text-xl ${buttonClasses}`} | ||
onClick={handleClick} | ||
type="button" | ||
{...rest} | ||
> | ||
{children} | ||
<SVGIcon name={iconName} className="pl-1" /> | ||
</button> | ||
); | ||
}; |
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