1

Sure I'm missing something about emotion. In a react/material-ui application I'm trying to add a classname that was generated by emotion (for each cell of my table I've different css styles).

The idea is to convert the style I've for each cell of my table into a className

    tbaleColumnDef.cellClassName = (cell: GridCellParams) => {
        const rowIdx = cell.row.rowIdx;
        const style = cellDecoration.cssStyles(rowIdx);   // this generates CSSProps for each cell
        const serializedStyles = css(style);  // emotion part
        return serializedStyles.name;
    }

SerializedStyles generated nicely my className, however it's not injected into de dom styles. How could I force this ?

ic3
  • 7,917
  • 14
  • 67
  • 115

0 Answers0