Skip to content

Commit

Permalink
Add SettingsGroup usage (#270)
Browse files Browse the repository at this point in the history
* Add group.png

* Update README.md
  • Loading branch information
TinyHai committed May 24, 2024
1 parent 745a0bd commit 4bdfc32
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ developers build complex settings screens without all the boilerplate.
| [SettingsTriStateCheckbox](#SettingsTriStateCheckbox) | <img width="200" alt="triState-checkbox" src="docs/art/triState-checkbox.png" /> |
| [SettingsRadioButton](#SettingsRadioButton) | <img width="200" alt="radiobutton.png" src="docs/art/radiobutton.png" /> |
| [SettingsSwitch](#SettingsSwitch) | <img width="200" alt="switch.png" src="docs/art/switch.png" /> |
| [SettingsGroup](#SettingsGroup) | <img width="200" alt="group.png" src="docs/art/group.png" /> |

**Ui tiles expanded**

| Component | Screenshot |
|-----------------------------------|----------------------------------------------------------------|
| [SettingsSlider](#SettingsSlider) | <img width="200" alt="switch.png" src="docs/art/slider.png" /> |
| [SettingsSlider](#SettingsSlider) | <img width="200" alt="slider.png" src="docs/art/slider.png" /> |

## Install

Expand Down Expand Up @@ -85,7 +86,7 @@ SettingsCheckbox(
)
```

<img width="300" alt="menu.png" src="docs/art/checkbox.png" />
<img width="300" alt="checkbox.png" src="docs/art/checkbox.png" />

##### SettingsTriStateCheckbox:

Expand All @@ -101,7 +102,7 @@ SettingsTriStateCheckbox(
)
```

<img width="300" alt="menu.png" src="docs/art/triState-checkbox.png" />
<img width="300" alt="triState-checkbox.png" src="docs/art/triState-checkbox.png" />

##### SettingsRadioButton:

Expand All @@ -117,7 +118,7 @@ SettingsRadioButton(
)
```

<img width="300" alt="menu.png" src="docs/art/radiobutton.png" />
<img width="300" alt="radiobutton.png" src="docs/art/radiobutton.png" />

##### SettingsSwitch:

Expand All @@ -133,7 +134,7 @@ SettingsSwitch(
)
```

<img width="300" alt="menu.png" src="docs/art/switch.png" />
<img width="300" alt="switch.png" src="docs/art/switch.png" />

##### SettingsSlider:

Expand All @@ -151,4 +152,22 @@ SettingsSlider(
)
```

<img width="300" alt="menu.png" src="docs/art/slider.png" />
<img width="300" alt="slider.png" src="docs/art/slider.png" />

##### SettingsGroup

```kotlin
SettingsGroup(
modifier = Modifier,
enabled = false / true,
title = { Text(text = "SettingsGroup") },
contentPadding = PaddingValues(16.dp),
) {
SettingsMenuLink(...)
SettingsCheckbox(...)
SettingsSwitch(...)
...
}
```

<img width="300" alt="group.png" src="docs/art/group.png" />
Binary file added docs/art/group.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4bdfc32

Please sign in to comment.