Skip to content

Commit

Permalink
heading 타입 email element에 id값 주입
Browse files Browse the repository at this point in the history
  • Loading branch information
dongoc committed Dec 26, 2024
1 parent b71c1ab commit dadb3c1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
16 changes: 12 additions & 4 deletions packages/triple-email-document/src/elements/heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,14 @@ const H4Container = styled.h4`
`

export function Heading1View({
id,
value: { text, headline },
}: {
id?: string
value: Heading1Document['value']
}) {
return (
<FluidTable>
<FluidTable id={id}>
<tbody>
<tr>
<Box padding={{ top: 25, bottom: 20, left: 30, right: 30 }}>
Expand All @@ -89,12 +91,14 @@ export function Heading1View({
}

export function Heading2View({
id,
value: { text },
}: {
id?: string
value: Heading2Document['value']
}) {
return (
<FluidTable>
<FluidTable id={id}>
<tbody>
<tr>
<Box padding={{ top: 20, bottom: 20, left: 30, right: 30 }}>
Expand All @@ -107,12 +111,14 @@ export function Heading2View({
}

export function Heading3View({
id,
value: { text },
}: {
id?: string
value: Heading3Document['value']
}) {
return (
<FluidTable>
<FluidTable id={id}>
<tbody>
<tr>
<Box padding={{ top: 20, left: 30, right: 30 }}>
Expand All @@ -125,12 +131,14 @@ export function Heading3View({
}

export function Heading4View({
id,
value: { text },
}: {
id?: string
value: Heading4Document['value']
}) {
return (
<FluidTable>
<FluidTable id={id}>
<tbody>
<tr>
<Box padding={{ top: 20, left: 30, right: 30 }}>
Expand Down
1 change: 1 addition & 0 deletions packages/triple-email-document/src/elements/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export type GetValue<Key extends TripleEmailElementType> = Extract<

const ELEMENTS: {
[key in TripleEmailElementType]: ComponentType<{
id?: string
value: GetValue<key>
}>
} = {
Expand Down

0 comments on commit dadb3c1

Please sign in to comment.