svelte-marina-button
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

Marina Connect button component for Svelte

Install

npm install -S svelte-marina-button
// or with yarn
yarn add svelte-marina-button

Example

Add to your svelte app

import Connect, { marinaStore, MarinaStore } from 'svelte-marina-button';

// You can subscribe to marina status changes
marinaStore.subscribe((s: MarinaStore) => {
	console.log(s.network);
	console.log(s.installed);
});

// you can pass optional cssClass to style your button
<Connect cssClass={'special-button-css'} />;

Developing

Test the library with an example page

yarn dev

# or start the server and open the app in a new browser tab
yarn dev -- --open

Building

Before creating a production version of your app, install an adapter for your target environment. Then:

yarn build

You can preview the built app with yarn preview, regardless of whether you installed an adapter. This should not be used to serve your app in production.

Release

  1. Increment the version and commit
npm version patch
  1. Package the library
npm run package

Now you can publish to NPM registry entering the package folder and running npm publish

/svelte-marina-button/

    Package Sidebar

    Install

    npm i svelte-marina-button

    Weekly Downloads

    0

    Version

    0.1.4

    License

    none

    Unpacked Size

    5.52 kB

    Total Files

    8

    Last publish

    Collaborators

    • tiero