@@ -15,6 +15,7 @@ const paddingMap = {
1515
1616interface CellContainerProps {
1717 padding : 'none' | 'dense' | 'normal' | 'wide'
18+ verticalAlign : 'top' | 'middle' | 'bottom'
1819 numeric : boolean
1920 header : boolean
2021}
@@ -28,13 +29,15 @@ const CellContainer = styled.td<CellContainerProps>`
2829 display: table-cell;
2930 border-bottom: ${ ( { theme } ) => theme . styles . border ( ) } ;
3031 ${ ( { padding } ) => paddingMap [ padding ] }
32+ ${ ( { verticalAlign } ) => `vertical-align: ${ verticalAlign } ;` }
3133 ${ ( { numeric } ) =>
3234 numeric && "text-align: right; font-feature-settings: 'tnum';" }
3335 ${ ( { header } ) => header && whenHeader }
3436`
3537
3638export interface CellProps {
3739 padding ?: 'none' | 'dense' | 'normal' | 'wide'
40+ verticalAlign ?: 'top' | 'middle' | 'bottom'
3841 header ?: boolean
3942 numeric ?: boolean
4043}
@@ -45,6 +48,7 @@ export const Cell: PC<'td', CellProps> = forwardRefWithGenerics(
4548 const tableRowGroupContext = useContext ( TableRowGroupContext )
4649 const {
4750 padding = tableContext . padding ,
51+ verticalAlign = tableRowGroupContext . verticalAlign ,
4852 header = tableRowGroupContext . header ,
4953 as,
5054 numeric = false ,
@@ -56,6 +60,7 @@ export const Cell: PC<'td', CellProps> = forwardRefWithGenerics(
5660 return (
5761 < CellContainer
5862 padding = { padding }
63+ verticalAlign = { verticalAlign }
5964 numeric = { numeric }
6065 header = { header }
6166 ref = { ref }
0 commit comments