Skip to content

Commit

Permalink
Update tabs demo
Browse files Browse the repository at this point in the history
  • Loading branch information
hpehl committed May 15, 2022
1 parent b72018c commit 64941ac
Show file tree
Hide file tree
Showing 5 changed files with 716 additions and 205 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ val components = listOf(
Component("tabs", "Tabs", TabsComponent.content),
Component("text", "Text", TextContentComponent.content),
Component("title", "Title", TitleComponent.content),
Component("toggle-group", "Toggle group", ToggleGroupComponent.content),
Component("tree-view", "Tree view", TreeViewComponent.content),
)

Expand Down
22 changes: 11 additions & 11 deletions src/main/kotlin/org/patternfly/showcase/component/DataList.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import org.patternfly.actionList
import org.patternfly.classes
import org.patternfly.clickButton
import org.patternfly.component
import org.patternfly.dataList2
import org.patternfly.dataList
import org.patternfly.fas
import org.patternfly.icon
import org.patternfly.layout
Expand All @@ -29,7 +29,7 @@ object DataListComponent {
)
pageSection {
snippet("Basic", DataListCode.BASIC) {
dataList2 {
dataList {
item {
cell { span(id = this@item.id) { +"Primary content" } }
cell { +"Secondary content" }
Expand All @@ -47,7 +47,7 @@ object DataListComponent {
}
}
snippet("Compact", DataListCode.COMPACT) {
dataList2(compact = true) {
dataList(compact = true) {
item {
cell { span(id = this@item.id) { +"Primary content" } }
cell { +"Secondary content" }
Expand All @@ -65,7 +65,7 @@ object DataListComponent {
}
}
snippet("Checkboxes, actions and additional cells", DataListCode.CHECKBOXES) {
val dl = dataList2 {
val dl = dataList {
item {
check()
cell { span(id = this@item.id) { +loremIpsum() } }
Expand Down Expand Up @@ -114,7 +114,7 @@ object DataListComponent {
}
}
snippet("Actions: single and multiple", DataListCode.ACTIONS) {
dataList2 {
dataList {
item {
cell { span(id = this@item.id) { +"Single actionable - primary content" } }
cell { +"Single actionable - secondary content" }
Expand All @@ -132,7 +132,7 @@ object DataListComponent {
}
}
snippet("Expandable", DataListCode.EXPANDABLE) {
dataList2 {
dataList {
arrayOf("Primary", "Secondary", "Tertiary").forEachIndexed { index, kind ->
item {
toggle()
Expand All @@ -156,7 +156,7 @@ object DataListComponent {
}
}
snippet("Selectable", "n/a") {
dataList2(selectable = true) {
dataList(selectable = true) {
item {
cell { span(id = this@item.id) { +"Single actionable - primary content" } }
cell { +"Single actionable - secondary content" }
Expand All @@ -183,8 +183,8 @@ object DataListComponent {
val store = storeOf(demos)
val selection = storeOf<Demo?>(null)

dataList2(selectable = true) {
items(store, selection, { it.id }) { demo ->
dataList(selectable = true) {
items(store, { it.id }, selection) { demo ->
item {
cell {
span(id = demo.id) { +demo.name }
Expand Down Expand Up @@ -223,8 +223,8 @@ object DataListComponent {
val store = storeOf(demos)
val selection = storeOf<List<Demo>>(emptyList())

dataList2 {
items(store, selection, { it.id }) { demo ->
dataList {
items(store, { it.id }, selection) { demo ->
item {
check()
cell {
Expand Down
Loading

0 comments on commit 64941ac

Please sign in to comment.