File tree Expand file tree Collapse file tree 2 files changed +184
-189
lines changed Expand file tree Collapse file tree 2 files changed +184
-189
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,18 @@ const TableCell = React.forwardRef<
166
166
} )
167
167
TableCell . displayName = "TableCell"
168
168
169
+ const TableCaption = React . forwardRef <
170
+ HTMLTableCaptionElement ,
171
+ React . HTMLAttributes < HTMLTableCaptionElement >
172
+ > ( ( { className, ...props } , ref ) => (
173
+ < caption
174
+ ref = { ref }
175
+ className = { cn ( "mt-4 text-sm text-body-medium" , className ) }
176
+ { ...props }
177
+ />
178
+ ) )
179
+ TableCaption . displayName = "TableCaption"
180
+
169
181
const mdxTableComponents = {
170
182
table : Table ,
171
183
td : ( { align, ...rest } ) => < TableCell align = { align } { ...rest } /> ,
@@ -179,6 +191,7 @@ export {
179
191
mdxTableComponents ,
180
192
Table ,
181
193
TableBody ,
194
+ TableCaption ,
182
195
TableCell ,
183
196
TableHead ,
184
197
TableHeader ,
You can’t perform that action at this time.
0 commit comments