UNPKG

@kiwicom/orbit-components

Version:

Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.

33 lines (31 loc) 837 B
import * as React from "react"; import styled from "styled-components"; import defaultTokens from "../../defaultTokens"; import ALIGN_OPTIONS from "./consts"; export const StyledTableCell = styled(({ children, className }) => React.createElement("td", { className: className }, children)).withConfig({ displayName: "TableCell__StyledTableCell", componentId: "sc-1dr7ow2-0" })(["box-sizing:border-box;font-size:", ";color:", ";text-align:", ";"], ({ theme }) => theme.orbit.fontSizeTextNormal, ({ theme }) => theme.orbit.paletteInkLight, ({ align }) => align); StyledTableCell.defaultProps = { theme: defaultTokens }; const TableCell = props => { const { align = ALIGN_OPTIONS.CENTER } = props; return React.createElement(StyledTableCell, { align: align }, props.children); }; export default TableCell;