diff --git a/docs/components/content/examples/TableExampleStyle.vue b/docs/components/content/examples/TableExampleStyle.vue new file mode 100644 index 00000000..905f9288 --- /dev/null +++ b/docs/components/content/examples/TableExampleStyle.vue @@ -0,0 +1,40 @@ + + + diff --git a/docs/content/4.data/1.table.md b/docs/content/4.data/1.table.md index 05d8ba20..cb2f369d 100644 --- a/docs/content/4.data/1.table.md +++ b/docs/content/4.data/1.table.md @@ -524,6 +524,65 @@ excludedProps: --- :: +## Styling + +You can apply styles to `tr` and `td` elements by passing a `class` to rows. + +Also, you can apply styles to `th` elements by passing a `class` to columns. + +::component-example +--- +padding: false +--- + +#default +:table-example-style{class="w-full"} + +#code +```vue + + + +``` +:: + ## Slots You can use slots to customize the header and data cells of the table. diff --git a/src/runtime/components/data/Table.vue b/src/runtime/components/data/Table.vue index da229a96..2500d7c5 100644 --- a/src/runtime/components/data/Table.vue +++ b/src/runtime/components/data/Table.vue @@ -49,12 +49,12 @@