Skip to content

Customising more aspects of Markdown tables #133

@EdricChan03

Description

@EdricChan03

Seems TableStyle only supports specifying the cell padding - it would be great for table headers to be styled too, perhaps with a modifier or a background colour

data class TableStyle(
  val cellPadding: PaddingValues,
  val headerRowStyle: TableRowStyle,
  val rowStyle: TableRowStyle, // perhaps?
)

data class TableRowStyle(
  val cellStyle: TableCellStyle
)

data class TableCellStyle(
  val backgroundColor: Color,
  val textColor: Color
)

@Composable
fun m3TableCellStyle() = TableCellStyle(
  MaterialTheme.colorScheme.surfaceContainer,
  MaterialTheme.colorScheme.onSurface
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions