15 lines
522 B
Plaintext
15 lines
522 B
Plaintext
component Table {
|
|
props {
|
|
size = "default"
|
|
color = "primary"
|
|
caption = "Table"
|
|
columns = []
|
|
rows = []
|
|
striped = true
|
|
class = ""
|
|
}
|
|
view {
|
|
<div class="wire-next wire-next--color-{color} wire-next--size-{size} wire-next--table {class}"><table><caption>{caption}</caption><thead><tr>{#each columns as column}<th>{column.label}</th>{/each}</tr></thead><tbody>{#each rows as row}<tr>{#each columns as column}<td>{row[column.key]}</td>{/each}</tr>{/each}</tbody></table><slot /></div>
|
|
}
|
|
}
|