-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bottle): profile component layout
- Loading branch information
Showing
6 changed files
with
144 additions
and
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function KakaoIdEditPage() { | ||
return <></>; | ||
} |
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 |
---|---|---|
@@ -1,10 +1,21 @@ | ||
import { Asset } from '@bottlesteam/ui'; | ||
import { ReactNode } from 'react'; | ||
import { headerStyle } from './headerStyle.css'; | ||
|
||
interface HeaderProps { | ||
children?: ReactNode; | ||
onGoBack?: () => void; | ||
} | ||
|
||
export function Header({ children }: HeaderProps) { | ||
return <header className={headerStyle}>{children}</header>; | ||
export function Header({ children, onGoBack }: HeaderProps) { | ||
return ( | ||
<header className={headerStyle}> | ||
{onGoBack != null && ( | ||
<button style={{ background: 'none', border: 'none' }}> | ||
<Asset onClick={onGoBack} type="icon-arrow-left" aria-label="go-back-icon" /> | ||
</button> | ||
)} | ||
{children} | ||
</header> | ||
); | ||
} |
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 { FixedBottomCTAButton, Paragraph, ParagraphProps, VariantOneProps } from '@bottlesteam/ui'; | ||
import { ReactNode } from 'react'; | ||
import { containerStyle } from './profileLayoutStyle.css'; | ||
|
||
interface Props { | ||
children: ReactNode; | ||
} | ||
|
||
function ProfileContainer({ children }: Props) { | ||
return <div className={containerStyle}>{children}</div>; | ||
} | ||
|
||
function Title({ children, ...rest }: Omit<ParagraphProps, 'typography' | 'color'>) { | ||
return ( | ||
<Paragraph typography="t1" color="black100" {...rest}> | ||
{children} | ||
</Paragraph> | ||
); | ||
} | ||
|
||
function Description({ children, ...rest }: Omit<ParagraphProps, 'typography' | 'color'>) { | ||
return ( | ||
<Paragraph typography="bo" color="neutral600" {...rest}> | ||
{children} | ||
</Paragraph> | ||
); | ||
} | ||
function Subtitle({ children, ...rest }: Omit<ParagraphProps, 'typography' | 'color'>) { | ||
return ( | ||
<Paragraph typography="st2" color="neutral600" {...rest}> | ||
{children} | ||
</Paragraph> | ||
); | ||
} | ||
|
||
function FixedButton(props: VariantOneProps) { | ||
return <FixedBottomCTAButton variant="one" {...props} />; | ||
} | ||
|
||
export const ProfileLayout = Object.assign(ProfileContainer, { | ||
Title, | ||
Description, | ||
Subtitle, | ||
FixedButton, | ||
}); |
40 changes: 40 additions & 0 deletions
40
apps/bottle/src/components/profile/layout/profileLayoutStyle.css.ts
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,40 @@ | ||
import { CTA_HEIGHT, spacings } from '@bottlesteam/ui'; | ||
import { style } from '@vanilla-extract/css'; | ||
|
||
/** | ||
* NOTE: This is a trick to make sure that | ||
* the Bottom CTA's gradient overlaps with the body of the Step Container. | ||
*/ | ||
export const OVERLAP_HEIGHT = 20; | ||
export const CONTAINER_OFFSET_HEIGHT = CTA_HEIGHT; | ||
|
||
export const buttonContainer = style({ | ||
position: 'fixed', | ||
bottom: 0, | ||
left: 0, | ||
width: '100%', | ||
height: `${CTA_HEIGHT}px`, | ||
paddingTop: spacings.xl, | ||
display: 'flex', | ||
justifyContent: 'center', | ||
background: 'linear-gradient(180deg, rgba(251, 251, 251, 0) 0%, #FBFBFB 25%)', | ||
}); | ||
|
||
export const containerStyle = style({ | ||
height: `calc(100vh - ${CONTAINER_OFFSET_HEIGHT - OVERLAP_HEIGHT}px)`, | ||
overflow: 'scroll', | ||
msOverflowStyle: 'none', | ||
scrollbarWidth: 'none', | ||
'::-webkit-scrollbar': { | ||
display: 'none', | ||
}, | ||
}); | ||
|
||
export const buttonStyle = style({ | ||
width: '100%', | ||
'@media': { | ||
'screen and (min-width: 500px)': { | ||
width: '360px', | ||
}, | ||
}, | ||
}); |
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