xref: /expo/docs/ui/components/Table/Cell.tsx (revision eebf9368)
1import { css } from '@emotion/react';
2import React, { PropsWithChildren } from 'react';
3
4import { TextAlign } from './types';
5
6type CellProps = PropsWithChildren<{
7  textAlign?: TextAlign;
8}>;
9
10export const Cell = ({ children, textAlign = TextAlign.Left }: CellProps) => (
11  <td css={[tableCellStyle, { textAlign }]}>{children}</td>
12);
13
14const tableCellStyle = css({
15  borderBottom: 0,
16  verticalAlign: 'middle',
17  wordBreak: 'break-word',
18});
19