Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MosógépSCH
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Disappointment industries™
MosógépSCH
Commits
6fc36a1c
Commit
6fc36a1c
authored
3 years ago
by
Tóth Miklós Tibor
Browse files
Options
Downloads
Patches
Plain Diff
Add dynamic spacer
parent
db0d8c9e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
mosogepsch/src/jsMain/kotlin/components/Content.kt
+15
-3
15 additions, 3 deletions
mosogepsch/src/jsMain/kotlin/components/Content.kt
with
15 additions
and
3 deletions
mosogepsch/src/jsMain/kotlin/components/Content.kt
+
15
−
3
View file @
6fc36a1c
...
...
@@ -5,10 +5,12 @@ import api.Api
import
api.Machine
import
app.softwork.bootstrapcompose.Container
import
org.jetbrains.compose.web.css.*
import
org.jetbrains.compose.web.dom.Div
@Composable
fun
content
()
{
val
data
by
remember
{
mutableStateOf
(
Api
.
getOnce
())
}
var
machine
by
remember
{
mutableStateOf
<
Machine
?>(
null
)
}
Container
(
attrs
=
{
style
{
...
...
@@ -17,15 +19,25 @@ fun content() {
flexWrap
(
FlexWrap
.
Wrap
)
justifyContent
(
JustifyContent
.
Center
)
paddingTop
(
1
.
em
)
paddingBottom
(
12
.
em
)
}
})
{
var
machine
by
remember
{
mutableStateOf
<
Machine
?>(
null
)
}
data
.
floors
.
forEach
{
floor
(
it
,
machine
)
{
m
->
machine
=
m
}
}
}
Div
(
attrs
=
{
style
{
width
(
0
.
px
)
if
(
machine
!=
null
)
{
height
(
17
.
em
)
}
else
{
height
(
0
.
em
)
}
property
(
"transition"
,
"height 0.75s"
)
}
})
{}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment