-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix padding in Sample
- Loading branch information
Showing
11 changed files
with
109 additions
and
15 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
...oidMain/kotlin/com/alorma/compose/settings/sample/shared/previews/SettingsGroupPreview.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.alorma.compose.settings.sample.shared.previews | ||
|
||
import androidx.compose.material3.Surface | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.tooling.preview.PreviewParameter | ||
import com.alorma.compose.settings.ui.SettingsCheckbox | ||
import com.alorma.compose.settings.ui.SettingsGroup | ||
import com.alorma.compose.settings.ui.SettingsMenuLink | ||
import com.alorma.compose.settings.ui.SettingsSwitch | ||
import theme.ComposeSettingsTheme | ||
|
||
@SuperPreviews | ||
@Composable | ||
internal fun SettingsGroupPreview( | ||
@PreviewParameter(provider = BooleanStateProvider::class) state: Boolean, | ||
) { | ||
ComposeSettingsTheme { | ||
Surface { | ||
SettingsGroup( | ||
title = { | ||
Text(text = "SettingsGroupPreview") | ||
}, | ||
enabled = state, | ||
) { | ||
SettingsMenuLink( | ||
title = { Text(text = "Menu link tile") }, | ||
onClick = {}, | ||
) | ||
SettingsCheckbox( | ||
state = true, | ||
title = { Text(text = "Checkbox tile") }, | ||
onCheckedChange = {}, | ||
) | ||
SettingsSwitch( | ||
state = true, | ||
title = { Text(text = "Switch tile") }, | ||
onCheckedChange = {}, | ||
) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...e/src/commonMain/kotlin/com/alorma/compose/settings/ui/base/internal/CompositionLocals.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.alorma.compose.settings.ui.base.internal | ||
|
||
import androidx.compose.runtime.compositionLocalOf | ||
|
||
val LocalSettingsGroupEnabled = compositionLocalOf { | ||
true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters