Happy Monday Framers! What's the best way I could give shared properties to layers? My code is like this :
card_shadows = ["card_left", "card_middle", "card_right"]card_shadows.properties = shadowY: 10 shadowBlur: 16 shadowColor: "rgba(0,0,0,0.4)"
This is not working ;'/ Do you have any suggestions?
How about using functions?
A for loop would be great for this. Create an array with layers, eg. [card_left,card_middle] etc. then use a for loop to set the properties of each one. Here's a great article about arrays and loops: https://medium.com/framer-prototyping/code-less-achieve-more-with-arrays-in-framer-c43594d13d59#.icv7euu5d
Another option is to subclass Layer and make something like ShadowLayer with default properties and make each new card as a ShadowLayer as opposed to generic Layer type.
Boom, thank you guys!