Skip to content

Commit fae34e5

Browse files
Calculate class more explicitly & separately to fix horizontal table cell alignment issue (#3252)
1 parent ba0094a commit fae34e5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/gitbook/src/components/DocumentView/Table/RecordColumnValue.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ export async function RecordColumnValue<Tag extends React.ElementType = 'div'>(
115115
return <Tag className={tcls(['w-full', verticalAlignment])}>{''}</Tag>;
116116
}
117117

118-
const horizontalAlignment = `[&_*]:${getColumnAlignment(definition)} ${getColumnAlignment(definition)}`;
118+
const horizontalAlignment = getColumnAlignment(definition);
119+
const childrenHorizontalAlignment = `[&_*]:${horizontalAlignment}`;
119120

120121
return (
121122
<Blocks
@@ -131,6 +132,7 @@ export async function RecordColumnValue<Tag extends React.ElementType = 'div'>(
131132
'leading-normal',
132133
verticalAlignment,
133134
horizontalAlignment,
135+
childrenHorizontalAlignment,
134136
]}
135137
context={context}
136138
blockStyle={['w-full', 'max-w-[unset]']}

0 commit comments

Comments
 (0)