Skip to content
Rogain <Range /> helper component
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.gitignore
.npmignore
LICENSE
README.md
index.js
package.json

README.md

rogain-helper-range

Returns children if data is between min and max. If the <Else /> branch is defined, it will be returned when data is out of range.

Omitting min or max will default to -Infinity and Infinity respectively.

<Each data={searchResults}>
    <Range data={@index} min="0" max="2">
        <!-- Top 3 -->
        <h2>{@item.title}</h2>
        <p>{@item.excerpt}</p>
    <Else />
        <!-- The rest -->
        <h3>{@item.title}</h3>
    </Range>
</Each>

Attributes

data

Variable or expression.

min

Number. Optional.

max

Number. Optional.

Install

With npm do:

npm install rogain-helper-range

License

MIT

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.