-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Lucasbentoskl/eng 238 feature profile page #206
Open
Lucas-Bento-D
wants to merge
31
commits into
detrash:staging
Choose a base branch
from
Lucas-Bento-D:lucasbentoskl/eng-238-feature-profile-page
base: staging
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+123
−46
Open
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
9d8cee4
merge
Lucas-Bento-D ca9ff5a
feat: add verification with server side
Lucas-Bento-D 76724a9
refactor: improvment on types
Lucas-Bento-D 37da341
Refactor: structure captcha
Lucas-Bento-D fa8505c
merge
Lucas-Bento-D f4c30e3
Merge branch 'detrash:staging' into staging
Lucas-Bento-D de4e416
Style: improvement style on profile settings
Lucas-Bento-D 97f08c4
Feature: add radioBox component
Lucas-Bento-D bf7341f
feature: add correct types
Lucas-Bento-D 9aa51d1
Feature: add success, focus and error styles on inputs
Lucas-Bento-D 6a99976
feature: add styles for inputs
Lucas-Bento-D b6b4456
feature: styles for radiobox check
Lucas-Bento-D cb43dc7
Style: improvement style on profile settings
Lucas-Bento-D 81adb75
Feature: add radioBox component
Lucas-Bento-D 5d0af9a
feature: add correct types
Lucas-Bento-D 127301c
Feature: add success, focus and error styles on inputs
Lucas-Bento-D 54e9d27
feature: add styles for inputs
Lucas-Bento-D 85eeba4
feature: styles for radiobox check
Lucas-Bento-D 6a151f7
feat; create audit and report modals
yurimutti 25fbd1a
feat: add status on audits
yurimutti 12e0338
feat: create onboarding modal
yurimutti 6a9079a
feat: add roles and remove hradcoded ids
yurimutti 1349875
feat: remove cors validate
yurimutti 0ae0642
Feature: add radioBox component
Lucas-Bento-D 232e952
Refactor: remove unnecessary import
Lucas-Bento-D aff4ac2
merge
Lucas-Bento-D 3817400
Merge pull request #207 from detrash/staging
yurimutti eba5615
Feat: change radiobox struct
Lucas-Bento-D 3bdc83b
Merge branch 'detrash:main' into lucasbentoskl/eng-238-feature-profil…
Lucas-Bento-D d09a434
Merge branch 'staging' into lucasbentoskl/eng-238-feature-profile-page
Lucas-Bento-D 8dad8b5
Feat: add options on zod type
Lucas-Bento-D File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group'; | ||
import { Label } from '@/components/ui/label'; | ||
|
||
import { Card, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; | ||
import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '@/components/ui/form'; | ||
|
||
type cssmapType = { | ||
[id: string]: string; | ||
}; | ||
const cssmap: cssmapType = { | ||
'option-hodler': 'option-hodler', | ||
'option-recycler': 'option-recycler', | ||
'option-waste': 'option-waste', | ||
}; | ||
interface Props { | ||
beforeText?: string; | ||
id: string; | ||
name: string; | ||
} | ||
export const RadioBox = ({ beforeText, id, name }: Props) => { | ||
return ( | ||
<> | ||
<FormItem key={`${id}-box`}> | ||
<FormLabel className="[&:has([data-state=checked])>div]:border-primary [&:has([data-state=checked])>div>.checked-box-symbol]:block"> | ||
<FormControl> | ||
<RadioGroupItem value={id} className="sr-only" /> | ||
</FormControl> | ||
<Card className="hover:border-primary [&:has([data-state=checked])]:border-primary relative flex h-28 cursor-pointer flex-col justify-center border-2 p-4 transition-colors duration-200 ease-in-out"> | ||
<div className="p0"> | ||
{/* <Icon icon={role.icon} className="text-primary mx-auto h-12 w-12" /> */} | ||
{beforeText && <span className="">{beforeText}</span>} | ||
<CardTitle className="mt-px pr-6 text-left text-base font-bold">{name}</CardTitle> | ||
</div> | ||
<span className="checked-box-symbol absolute right-6 top-6 hidden h-5 w-5 rounded-full bg-blue-500 text-center text-sm text-white [&:has([data-state=checked])]:block"> | ||
✓ | ||
</span> | ||
</Card> | ||
</FormLabel> | ||
</FormItem> | ||
</> | ||
); | ||
}; |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Here, we will keep the component pure without rules (recycler etc)
https://ui.shadcn.com/docs/components/radio-group