Skip to content

Commit

Permalink
style: checkbox styling
Browse files Browse the repository at this point in the history
  • Loading branch information
celinechoiii committed Nov 19, 2024
1 parent afcc1c2 commit 5478965
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/(auth)/forgotpassword/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function SignIn() {
<Logo src={BRLogo} alt="An example image" />
<Card>
<Form>
<Link href="/onboarding/general">
<Link href="/signin">
<Image src={Back} alt="Back icon" />
</Link>
<H5>Forgot Password?</H5>
Expand Down
4 changes: 2 additions & 2 deletions app/discover/[event_id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
BackButton,
Body,
Bullet,
Checkbox,
Container,
FacilityName,
HostWarningTitle,
Expand All @@ -23,7 +24,6 @@ import {
InterestBlock,
InterestTitle,
Location,
Select,
ShowInterest,
SignUp,
TagDiv,
Expand All @@ -36,7 +36,7 @@ function InterestBlockGen(title: string, about: string, icon: string) {
return (
<InterestBlock>
{' '}
<Select />
<Checkbox type="checkbox" />
<TextWithIcon>
<div>
<InterestTitle $fontWeight="500"> {title}</InterestTitle>
Expand Down
17 changes: 12 additions & 5 deletions app/discover/[event_id]/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,19 @@ export const InterestBlock = styled.div`
margin-bottom: 0.75rem;
`;

export const Select = styled.div`
border-radius: 4px;
export const Checkbox = styled.input.attrs({ type: 'checkbox' })`
width: 20px;
height: 20px;
border: 2px solid ${COLORS.rose10};
width: 0.875rem;
height: 0.875rem;
line-height: 4.5rem;
border-radius: 4px;
appearance: none;
outline: none;
cursor: pointer;
&:checked {
background-color: ${COLORS.rose10}; /* Optional: Red background when checked */
border-color: ${COLORS.rose10}; /* Border stays red when checked */
}
`;

export const InterestTitle = styled(P)`
Expand Down
1 change: 0 additions & 1 deletion app/onboarding/general/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ export default function Onboarding() {
/>
<UpdateContainer>
<Checkbox
type="checkbox"
name="notifications"
checked={generalInfo.notifications}
onChange={handleChange}
Expand Down
11 changes: 10 additions & 1 deletion app/onboarding/general/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,19 @@ export const UpdateContainer = styled.main`
margin-top: 1.75rem;
`;

export const Checkbox = styled.input`
export const Checkbox = styled.input.attrs({ type: 'checkbox' })`
width: 20px;
height: 20px;
border: 2px solid ${COLORS.rose10};
border-radius: 4px;
appearance: none;
outline: none;
cursor: pointer;
&:checked {
background-color: ${COLORS.rose10}; /* Optional: Red background when checked */
border-color: ${COLORS.rose10}; /* Border stays red when checked */
}
`;

export const UpdateText = styled.text`
Expand Down

0 comments on commit 5478965

Please sign in to comment.