@gulw/components
TypeScript icon, indicating that this package has built-in type declarations

0.8.17 • Public • Published

Framewrok7 Components With Hyperapp

Mobile UI for Hyperapp

NPM version npm download

Updating

v0.8.17 - October 26, 2018

  • Dialog: support key perporty in ButtonOptions
  • Overlay: prevent scrolling on overlays

v0.8.16 - October 18, 2018

  • Dialog: support not button layout

v0.8.12 - September 21, 2018

  • Minor fixes, remove a few lines of duplicated code
  • PullToRefresh:
    • call e.preventDefault in touchmove event when use translate, to prevent some unexpected browser behavior.
    • remove transition classname when not needed

check Change Log for more.

Components

Kitchen Sink

Docs are not ready yet, you can learn about Components and their Apis in typing files for now.

Install

npm install --save @gulw/components

You can also access bundled file in unpkg, global name is F7Components

https://unpkg.com/@gulw/components@0.7.26/dist/f7-components.js

Modularized

The following two ways used to load the only components you used, select one of the ways you like.

  • Use babel-plugin-import

    // .babelrc or babel-loader option
    {
      "plugins": [
        ["import", { "libraryName": "@gulw/components", "style": "css" }] // `style: true` for less
      ]
    }

    This allows you to import components without having to manually import the corresponding stylesheet. The babel plugin will automatically import stylesheets.

    // import js and css modularly, parsed by babel-plugin-import
    import { Picker } from '@gulw/components';
  • Manually import

    import Picker from '@gulw/components/lib/picker';  // for js
    import '@gulw/components/lib/picker/style/css';    // for css
    // import '@gulw/components/lib/picker/style';     // that will import less

Example

See more example in demos

import { h, app } from 'hyperapp'
import { Page, Navbar, ContentBlock } from '@gulw/components'
// import css
import '@gulw/components/dist/f7-components.css'

const Main = () => {
  return (
    <Page
      navbar={
        <Navbar center="My App" />
      }
    >
      <ContentBlock>
        <p>Example app</p>
      </ContentBlock>
    </Page>
  )
}

app({}, {}, Main, document.body)

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.8.172latest

Version History

VersionDownloads (Last 7 Days)Published
0.8.172
0.8.160
0.8.150
0.8.140
0.8.130
0.8.120
0.8.110
0.8.100
0.8.90
0.8.80
0.8.70
0.8.60
0.8.50
0.8.40
0.8.30
0.8.20
0.8.10
0.7.310
0.7.300
0.7.290
0.7.280
0.7.270
0.7.260
0.7.250
0.7.240
0.7.230
0.7.220
0.7.210
0.7.200
0.7.190
0.7.180
0.7.170
1.0.160
0.7.160
0.7.150
0.7.140
0.7.130
0.7.120
0.7.110
0.7.100
0.7.90
0.7.80
0.7.70
0.7.60
0.7.50
0.7.40
0.7.30
0.7.20

Package Sidebar

Install

npm i @gulw/components

Weekly Downloads

2

Version

0.8.17

License

ISC

Unpacked Size

774 kB

Total Files

379

Last publish

Collaborators

  • gulewei