Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
525
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.68 KB | None | 0 0
  1. prototype(Onedrop.Demo:Atom.Button) < prototype(PackageFactory.AtomicFusion:Component) {
  2. text = ''
  3. type = 'default'
  4. size = ''
  5.  
  6. renderer = Neos.Fusion:Tag {
  7. tagName = 'button'
  8. attributes.class = PackageFactory.AtomicFusion:ClassNames {
  9. btn = true
  10. btn-default = ${props.type == 'default'}
  11. btn-primary = ${props.type == 'primary'}
  12. btn-secondary = ${props.type == 'secondary'}
  13. btn-lg = ${props.size == 'large'}
  14. btn-sm = ${props.size == 'small'}
  15. }
  16. content = ${props.text}
  17. }
  18. }
  19.  
  20. prototype(Onedrop.Demo:Atom.Headline) < prototype(PackageFactory.AtomicFusion:Component) {
  21. text = ''
  22. level = 1
  23. level.@process.lowerBoundary = ${(value < 1 ? 1 : value)}
  24. level.@process.upperBoundary = ${(value > 6 ? 6 : value)}
  25. fancy = false
  26.  
  27. renderer = Neos.Fusion:Tag {
  28. attributes.class = PackageFactory.AtomicFusion:ClassNames {
  29. headline = true
  30. headline--default = ${props.fancy == false}
  31. headline--fancy = ${props.fancy == true}
  32. }
  33. content = Neos.Fusion:Tag {
  34. tagName = ${'h' + props.level}
  35. content = ${props.text}
  36. }
  37. }
  38. }
  39.  
  40. prototype(Onedrop.Demo:Molecule.HeadlineButton) < prototype(PackageFactory.AtomicFusion:Component) {
  41. headline = Neos.Fusion:RawArray {
  42. text = ''
  43. level = 1
  44. fancy = false
  45. }
  46. button = Neos.Fusion:RawArray {
  47. text = ''
  48. type = 'default'
  49. size = ''
  50. }
  51. renderer = Neos.Fusion:Array {
  52. headline = Onedrop.Demo:Atom.Headline {
  53. text = ${props.headline.text}
  54. level = ${props.headline.level}
  55. fancy = ${props.headline.fancy}
  56. }
  57. button = Onedrop.Demo:Atom.Button {
  58. text = ${props.button.text}
  59. type = ${props.button.type}
  60. size = ${props.button.size}
  61. }
  62. }
  63. }
  64.  
  65. prototype(Onedrop.Demo:HeadlineButton) < prototype(Neos.Fusion:Renderer) {
  66. node = ${node}
  67. renderer = Onedrop.Demo:Molecule.HeadlineButton {
  68. headline.text = ${q(node).property('headlineText')}
  69. headline.text.@process.makeEditable = Neos.Neos:ContentElementEditable
  70. headline.text.@process.makeEditable.property = 'headlineText'
  71. headline.level = ${q(node).property('headlineLevel')}
  72. headline.fancy = ${q(node).property('headlineFancy')}
  73. button.text = ${q(node).property('buttonText')}
  74. button.type = ${q(node).property('buttonType')}
  75. button.size = ${q(node).property('buttonSize')}
  76. }
  77. @process.contentElementWrapping {
  78. expression = Neos.Neos:ContentElementWrapping
  79. @position = 'end 999999999'
  80. }
  81. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement