Skip to content

Question about the design #25

Closed Answered by mkocansey
juanma1331 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @juanma1331 thanks. I am glad you are picking some knowledge from the Bladewind components.

To be honest placing the colours array at the props level was more of a personal preference. I prefer to keep attribute declarations at the props level and actual logic after the props declaration. So in this specific case, I consider $coloring to be a computed prop attribute that is based on the value of $color.

However, it is perfectly possible to have declared $coloring within the @php block. You'd end up with the same results.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@juanma1331
Comment options

Answer selected by mkocansey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants