-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
431d73c
commit 9111869
Showing
4 changed files
with
82 additions
and
1 deletion.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
61 changes: 61 additions & 0 deletions
61
src/component/template/component/InvitationLetterTemplate.tsx
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,61 @@ | ||
import React from 'react'; | ||
import {Column, Row} from "@designsystem/component/flexLayout"; | ||
import HorizontalDivider from "@designsystem/component/horizontalDivider"; | ||
import colors from "@designsystem/foundation/colors"; | ||
import Text from "@designsystem/component/text"; | ||
import Greeting from "@remote/value/Greeting"; | ||
import BaseInfo from "@remote/value/BaseInfo"; | ||
|
||
export type InvitationLetterStyle = 'style1' | 'style2' | 'style3'; | ||
|
||
interface InvitationLetterTemplateProps { | ||
baseInfo: BaseInfo; | ||
greeting: Greeting; | ||
invitationLetterStyle: InvitationLetterStyle; | ||
} | ||
|
||
function InvitationLetterTemplate( | ||
{ | ||
baseInfo, | ||
greeting, | ||
invitationLetterStyle | ||
}: InvitationLetterTemplateProps | ||
) { | ||
return ( | ||
<Column gap={40} padding={'72px 60px'} background={colors.white} $alignItems={'center'}> | ||
{invitationLetterStyle === 'style1' ? ( | ||
<Text className={'override-font'} weight={300} size={12} font={'Aleo'} color={colors.g300}> | ||
Wedding Invitation | ||
</Text> | ||
) : invitationLetterStyle === 'style3' ? ( | ||
<img src={'/invitationLetterIcon.svg'} width={20} height={20} alt="" color={colors.white}/> | ||
) : ( | ||
<></> | ||
)} | ||
<GreetingContent text={greeting.greetingContent}/> | ||
<HorizontalDivider style={{width: 140}}/> | ||
<Text weight={300} size={14} color={colors.g600}> | ||
<Row $alignItems={'center'} gap={8}> | ||
<span>신랑 {baseInfo.groomName}</span><span>•</span><span>신부 {baseInfo.brideName}</span> | ||
</Row> | ||
</Text> | ||
</Column> | ||
); | ||
} | ||
|
||
function GreetingContent(props: { text: string }) { | ||
return ( | ||
<Text | ||
size={14} | ||
color={colors.g600} | ||
weight={300} | ||
style={{ | ||
overflow: 'hidden', | ||
wordBreak: 'break-all', | ||
textAlign: 'center' | ||
}} | ||
>{props.text}</Text> | ||
); | ||
} | ||
|
||
export default InvitationLetterTemplate; |