Skip to content

Rendering a component with argument #632

Answered by gsalunke
gsalunke asked this question in Q&A
Discussion options

You must be logged in to vote

Below is the code snippet:

-- boolean render-default: false

-- integer $variable: 0


-- data:
if: { variable >= 1 }
t1: Some t1 value
t2: Some t2 value

-- show-data:
if: { variable <= 1 }




-- component show-data:

-- ftd.text: Click here to show `data`
role: $inherited.types.heading-small
color: $inherited.colors.text-strong
cursor: pointer
$on-click$: $ftd.increment-by($a = $variable, v = 5)


-- end: show-data


-- component data:
string t1:
string t2:
boolean render: $render-default

-- ftd.column:
width: fill-container
margin-vertical.px: 24

-- ftd.text: Rendering with condition
role: $inherited.types.copy-regular
color: $inherited.colors.text

-- end: ftd.column

-- end: data

V…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gsalunke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant