carbon-react
Version:
A library of reusable React components for easily building user interfaces.
2 lines (1 loc) • 1.39 kB
JavaScript
import t,{css as e}from"styled-components";import{padding as r}from"styled-system";import o from"./flat-table-header-utils.js";import i from"../../../style/themes/apply-base-theme.js";import{toColor as l}from"../../../style/utils/color.js";const d={small:"1px",medium:"2px",large:"4px"},a=t.th.attrs(i).withConfig({displayName:"flat-table-header.style__StyledFlatTableHeader",componentId:"sc-16315b2b-0"})(["",""],(({align:t,alternativeBgColor:i,colWidth:a,leftPosition:n,rightPosition:s,makeCellSticky:p,verticalBorder:m,verticalBorderColor:c,colorTheme:h,theme:g})=>e(["background-color:transparent;border-width:0;box-sizing:border-box;font-weight:500;left:auto;text-align:",";user-select:none;vertical-align:middle;word-break:keep-all;padding:0;"," &:first-child{padding-left:1px;}&&&{> div{box-sizing:border-box;"," ","}}",";"," &&&{"," ","}}"],t,a&&e(["width:","px;"],a),r,a&&e(["width:","px;"],a),i&&e(["&&&{background-color:",";}&&&:first-child{border-left:unset;}"],o(h)),p&&e([""," "," position:sticky;&:first-child{padding-right:0.395em;@-moz-document url-prefix(){padding-right:2px;}@media not all and (min-resolution:.001dpcm){@supports (-webkit-appearance:none) and (stroke-color:transparent){padding-right:0.9em;}}"],void 0!==n&&`left: ${n}px;`,void 0!==s&&`right: ${s}px;`),m&&e(["border-right-width:",";"],d[m]),c&&e(["border-right-color:",";"],l(g,c)))));export{a as default};