0.0.2 • Published 11 months ago

@substrate-system/arrow-prev v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

arrow prev

tests types module install size dependencies semantic versioning license

An icon button for going backwards.

See a live demo

install

npm i -S @substrate-system/arrow-prev

API

This exposes ESM and common JS via package.json exports field.

ESM

import '@substrate-system/arrow-prev'

Common JS

require('@substrate-system/arrow-prev')

CSS

@substrate-system/css-util

Use @substrate-system/css-util/arrow, or import CSS from this module.

import '@substrate-system/css-util/arrow'

Import this module's CSS

import '@substrate-system/arrow-prev/css'

Or minified:

import '@substrate-system/arrow-prev/css/min'

use

This calls the global function customElements.define. Just import, then use the tag in your HTML.

JS

import '@substrate-system/arrow-prev'

HTML

<div>
    <arrow-prev></arrow-prev>
</div>

pre-built

This package exposes minified JS and CSS files too. Copy them to a location that is accessible to your web server, then link to them in HTML.

copy

cp ./node_modules/@substrate-system/arrow-prev/dist/index.min.js ./public/arrow-prev.min.js
cp ./node_modules/@substrate-system/arrow-prev/dist/style.min.css ./public/arrow-prev.css

HTML

<head>
    <link rel="stylesheet" href="./arrow-prev.css">
</head>
<body>
    <!-- ... -->
    <script type="module" src="./arrow-prev.min.js"></script>
</body>
0.0.2

11 months ago

0.0.1

11 months ago