File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
compose-multiplatform-common/src/commonMain/kotlin/com/huanshankeji/compose/ui
demo/src/commonMain/kotlin/com/huanshankeji/compose/material/demo Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,15 @@ expect class StyleScope {
1515 fun margin (value : SizeValue )
1616}
1717
18+ private const val PADDING_MESSAGE =
19+ " This function is a placeholder for code completion. " +
20+ " Use `margin` to add space around the composable, which is equivalent to `Modifier.padding`. " +
21+ " Set `margin` in the inner composable to add inner padding."
22+
23+ @Deprecated(PADDING_MESSAGE )
24+ fun StyleScope.padding (value : SizeValue ): Unit =
25+ throw NotImplementedError (PADDING_MESSAGE )
26+
1827/*
1928/** An alternative immutable design like [Modifier]. */
2029expect class ModifierOrAttrsImmutable<T : Element> {
Original file line number Diff line number Diff line change @@ -24,7 +24,11 @@ fun App() {
2424 margin(16 .dpOrPx)
2525 }
2626 }) {
27- Column {
27+ Column ({
28+ style {
29+ margin(16 .dpOrPx)
30+ }
31+ }) {
2832 BasicText (" basic text" )
2933 Text (" Material text" )
3034
You can’t perform that action at this time.
0 commit comments