How to use the omi.rpx function in omi

To help you get started, we’ve selected a few omi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Tencent / omi / packages / omi-snake / src / components / index / index.js View on Github external
<div class="ctrl">
      <div class="btn cm-btn cm-btn-dir up"><i></i><em></em><span>Up</span></div>
      <div class="btn cm-btn cm-btn-dir down"><i></i><em></em><span>Down</span></div>
      <div class="btn cm-btn cm-btn-dir left"><i></i><em></em><span>Left</span></div>
      <div class="btn cm-btn cm-btn-dir right"><i></i><em></em><span>Right</span></div>
      <div class="btn cm-btn space"><i></i><span>加速/减速</span></div>
      <div class="btn reset small"><i></i><span>Reset</span></div>
      <div class="btn pp small"><i></i><span>{store.data.paused ? 'Play' : 'Pause'}</span></div>
    </div>
  

), {
  use: ['paused'],
  css: rpx(require('./_index.css'))
})
github Tencent / omi / packages / omi-snake / src / components / game / index.js View on Github external
define('my-game', _ =&gt; (
  <div class="game">
    {_.store.data.map.map(row =&gt; {
      return <p>
        {row.map(col =&gt; {
          if (col) {
            return <b class="s"></b>
          }
          return <b></b>
        })}
      </p>
    })}
  </div>
), {
  use: ['map'],
  css: rpx(require('./_index.css'))
})

omi

<p align="center"><img src="https://omijs.github.io/home/assets/logo.svg" alt="omi" width="100"/></p> <h2 align="center">Omi - Web Components Framework</h2>

MIT
Latest version published 2 months ago

Package Health Score

79 / 100
Full package analysis