Skip to content

Commit e0525e5

Browse files
committed
Release 4.0.0
1 parent 469b273 commit e0525e5

File tree

8 files changed

+387
-31
lines changed

8 files changed

+387
-31
lines changed

docs/assets/js/search.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,32 @@ <h1 id="cyclejs-modal">cyclejs-modal</h1>
6868
<p>An easy way to open custom modals in a cyclejs app</p>
6969
<h2 id="use-it">Use it</h2>
7070
<p><code>npm install --save cyclejs-modal</code></p>
71+
<h2 id="caveats">Caveats</h2>
72+
<p><code>modalify</code> assumes that your DOM Driver is using the <code>DOM</code> property for sink and source.</p>
73+
<h2 id="example">Example</h2>
74+
<p>You can find the examples in the <a href="https://github.com/cyclejs-community/cyclejs-modal/tree/master/examples">examples/</a> folder</p>
75+
<pre><code class="lang-js"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">main</span>(<span class="hljs-params">{ DOM }</span>) </span>{
76+
<span class="hljs-keyword">return</span> {
77+
<span class="hljs-attr">DOM</span>: xs.of(button(<span class="hljs-string">'.button'</span>, [<span class="hljs-string">'open modal'</span>])),
78+
<span class="hljs-attr">modal</span>: DOM.select(<span class="hljs-string">'.button'</span>).events(<span class="hljs-string">'click'</span>)
79+
.mapTo({
80+
<span class="hljs-attr">type</span>: <span class="hljs-string">'open'</span>,
81+
<span class="hljs-attr">component</span>: isolate(modal, <span class="hljs-string">'myscope'</span>)
82+
} <span class="hljs-keyword">as</span> ModalAction)
83+
};
84+
}
85+
86+
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">modal</span>(<span class="hljs-params">{ DOM }</span>) </span>{
87+
<span class="hljs-keyword">return</span> {
88+
<span class="hljs-attr">DOM</span>: xs.of(div(<span class="hljs-string">'.div'</span>, [
89+
span(<span class="hljs-string">'.span'</span>, [<span class="hljs-string">'This is a modal. Yeah? :)'</span>]),
90+
button(<span class="hljs-string">'.button'</span>, [<span class="hljs-string">'close'</span>])
91+
])),
92+
<span class="hljs-attr">modal</span>: DOM.select(<span class="hljs-string">'.button'</span>).events(<span class="hljs-string">'click'</span>)
93+
.mapTo({ <span class="hljs-attr">type</span>: <span class="hljs-string">'close'</span> } <span class="hljs-keyword">as</span> ModalAction)
94+
};
95+
}
96+
</code></pre>
7197
<h2 id="try-it">Try it</h2>
7298
<p>Clone it, run <code>npm i &amp;&amp; npm run examples</code></p>
7399
</div>

docs/interfaces/_modalify_.close.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> count</h3>
9999
<div class="tsd-signature tsd-kind-icon">count<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
100100
<aside class="tsd-sources">
101101
<ul>
102-
<li>Defined in <a href="https://github.com/cyclejs-community/cyclejs-modal/blob/b29f89e/src/modalify.ts#L18">modalify.ts:18</a></li>
102+
<li>Defined in <a href="https://github.com/cyclejs-community/cyclejs-modal/blob/469b273/src/modalify.ts#L18">modalify.ts:18</a></li>
103103
</ul>
104104
</aside>
105105
</section>
@@ -109,7 +109,7 @@ <h3>type</h3>
109109
<div class="tsd-signature tsd-kind-icon">type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"close"</span></div>
110110
<aside class="tsd-sources">
111111
<ul>
112-
<li>Defined in <a href="https://github.com/cyclejs-community/cyclejs-modal/blob/b29f89e/src/modalify.ts#L17">modalify.ts:17</a></li>
112+
<li>Defined in <a href="https://github.com/cyclejs-community/cyclejs-modal/blob/469b273/src/modalify.ts#L17">modalify.ts:17</a></li>
113113
</ul>
114114
</aside>
115115
</section>
@@ -149,6 +149,9 @@ <h3>type</h3>
149149
<li class=" tsd-kind-interface tsd-parent-kind-external-module">
150150
<a href="_modalify_.open.html" class="tsd-kind-icon">Open</a>
151151
</li>
152+
<li class=" tsd-kind-interface tsd-parent-kind-external-module">
153+
<a href="_modalify_.options.html" class="tsd-kind-icon">Options</a>
154+
</li>
152155
<li class=" tsd-kind-type-alias tsd-parent-kind-external-module">
153156
<a href="../modules/_modalify_.html#component" class="tsd-kind-icon">Component</a>
154157
</li>

docs/interfaces/_modalify_.message.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ <h3>payload</h3>
9999
<div class="tsd-signature tsd-kind-icon">payload<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
100100
<aside class="tsd-sources">
101101
<ul>
102-
<li>Defined in <a href="https://github.com/cyclejs-community/cyclejs-modal/blob/b29f89e/src/modalify.ts#L22">modalify.ts:22</a></li>
102+
<li>Defined in <a href="https://github.com/cyclejs-community/cyclejs-modal/blob/469b273/src/modalify.ts#L22">modalify.ts:22</a></li>
103103
</ul>
104104
</aside>
105105
</section>
@@ -109,7 +109,7 @@ <h3>type</h3>
109109
<div class="tsd-signature tsd-kind-icon">type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"message"</span></div>
110110
<aside class="tsd-sources">
111111
<ul>
112-
<li>Defined in <a href="https://github.com/cyclejs-community/cyclejs-modal/blob/b29f89e/src/modalify.ts#L21">modalify.ts:21</a></li>
112+
<li>Defined in <a href="https://github.com/cyclejs-community/cyclejs-modal/blob/469b273/src/modalify.ts#L21">modalify.ts:21</a></li>
113113
</ul>
114114
</aside>
115115
</section>
@@ -149,6 +149,9 @@ <h3>type</h3>
149149
<li class=" tsd-kind-interface tsd-parent-kind-external-module">
150150
<a href="_modalify_.open.html" class="tsd-kind-icon">Open</a>
151151
</li>
152+
<li class=" tsd-kind-interface tsd-parent-kind-external-module">
153+
<a href="_modalify_.options.html" class="tsd-kind-icon">Options</a>
154+
</li>
152155
<li class=" tsd-kind-type-alias tsd-parent-kind-external-module">
153156
<a href="../modules/_modalify_.html#component" class="tsd-kind-icon">Component</a>
154157
</li>

docs/interfaces/_modalify_.open.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ <h3>component</h3>
9999
<div class="tsd-signature tsd-kind-icon">component<span class="tsd-signature-symbol">:</span> <a href="../modules/_modalify_.html#component" class="tsd-signature-type">Component</a></div>
100100
<aside class="tsd-sources">
101101
<ul>
102-
<li>Defined in <a href="https://github.com/cyclejs-community/cyclejs-modal/blob/b29f89e/src/modalify.ts#L13">modalify.ts:13</a></li>
102+
<li>Defined in <a href="https://github.com/cyclejs-community/cyclejs-modal/blob/469b273/src/modalify.ts#L13">modalify.ts:13</a></li>
103103
</ul>
104104
</aside>
105105
</section>
@@ -109,7 +109,7 @@ <h3>type</h3>
109109
<div class="tsd-signature tsd-kind-icon">type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"open"</span></div>
110110
<aside class="tsd-sources">
111111
<ul>
112-
<li>Defined in <a href="https://github.com/cyclejs-community/cyclejs-modal/blob/b29f89e/src/modalify.ts#L12">modalify.ts:12</a></li>
112+
<li>Defined in <a href="https://github.com/cyclejs-community/cyclejs-modal/blob/469b273/src/modalify.ts#L12">modalify.ts:12</a></li>
113113
</ul>
114114
</aside>
115115
</section>
@@ -149,6 +149,9 @@ <h3>type</h3>
149149
</li>
150150
</ul>
151151
<ul class="after-current">
152+
<li class=" tsd-kind-interface tsd-parent-kind-external-module">
153+
<a href="_modalify_.options.html" class="tsd-kind-icon">Options</a>
154+
</li>
152155
<li class=" tsd-kind-type-alias tsd-parent-kind-external-module">
153156
<a href="../modules/_modalify_.html#component" class="tsd-kind-icon">Component</a>
154157
</li>

0 commit comments

Comments
 (0)