3838 )
3939}
4040
41+ #universal UniversalCounterCore (props) {
42+ state count = 0
43+ return (
44+ < button onClick={() => count += 1 } className={props.className}>
45+ Count: {count}
46+ </button>
47+ )
48+ }
49+
4150#universal UniversalCounter (props) {
4251 state count = 0
4352 return (
5059 )
5160}
5261
62+ #react ReactUniversalCounter (props) {
63+ return (
64+ < div style={{ textAlign: 'center', padding: '2rem', background: 'rgba (255 ,255 ,255 ,0.03 )', borderRadius: '24px', border: '1px solid rgba (255 ,255 ,255 ,0.1 )' }}>
65+ < h3 style={{ color: '#61dafb', marginBottom: '1 .5rem' }}> Universal in React</h3>
66+ <UniversalCounterCore className={props.className} />
67+ </div>
68+ )
69+ }
70+
71+ #preact PreactUniversalCounter (props) {
72+ return (
73+ < div style={{ textAlign: 'center', padding: '2rem', background: 'rgba (255 ,255 ,255 ,0.03 )', borderRadius: '24px', border: '1px solid rgba (255 ,255 ,255 ,0.1 )' }}>
74+ < h3 style={"color: #673ab8; margin-bottom: 1.5rem" }> Universal in Preact< /h3>
75+ < UniversalCounterCore className={props.className} />
76+ < /div>
77+ )
78+ }
79+
80+ #solid SolidUniversalCounter (props) {
81+ return (
82+ < div style={{ 'text-align': 'center', padding: '2rem', background: 'rgba (255 ,255 ,255 ,0.03 )', 'border-radius': '24px', border: '1px solid rgba (255 ,255 ,255 ,0.1 )' }}>
83+ < h3 style={"color: #2c4f7c; margin-bottom: 1.5rem" }> Solid< /h3>
84+ < UniversalCounterCore className={props.className} />
85+ < /div>
86+ )
87+ }
88+
5389func IntegrationPage (page : &mut HtmlPage) {
5490 page.appendTitle ("Integration - Chemical" )
5591 page.defaultPrepare ()
@@ -81,7 +117,7 @@ func IntegrationPage(page : &mut HtmlPage) {
81117 < div class="container" >
82118 < div class="page-header" >
83119 < h1> Framework Integration< /h1>
84- < p> You can use multiple frameworks in chemical simultaneously. Use the framework that fits your needs.s < /p>
120+ < p> You can use multiple frameworks in chemical simultaneously. Use the framework that fits your needs.< /p>
85121 < /div>
86122
87123 < div class="comp-showcase" >
@@ -98,6 +134,24 @@ func IntegrationPage(page : &mut HtmlPage) {
98134 < UniversalCounter className={btnStyle} />
99135 < /div>
100136 < /div>
137+
138+ < div style="max-width:800px;" >
139+ < h1> Universal Integration< /h1>
140+ < p> You can use universal components in any of the other frameworks, easing development of ui component libraries. Universal components emit least amount of JS, support SSR + hydration.< /p>
141+ < /div>
142+
143+ < div class="comp-showcase" >
144+ < div class="comp-item" >
145+ < ReactUniversalCounter className={btnStyle} />
146+ < /div>
147+ < div class="comp-item" >
148+ < PreactUniversalCounter className={btnStyle} />
149+ < /div>
150+ < div class="comp-item" >
151+ < SolidUniversalCounter className={btnStyle} />
152+ < /div>
153+ < /div>
154+
101155 < /div>
102156 }
103157 SocialFooter (page)
0 commit comments