1.0.3 • Published 11 months ago

@cursorly/web-components v1.0.3

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

Built With Stencil

Cursorly web components

This package hosts web components for Cursorly app.

How to use

The easiest way to is to import via Unpkg.

In your index.html file:

<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Awesome app</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge;"/>

    <script type="module" src="https://www.unpkg.com/@cursorly/web-components@0.0.6-alpha.4/dist/web-components/web-components.esm.js"></script>
  
</head>
<body>
</body>
</html>

If you want to bundle it with your framework, you can use the following.

  • yarn install @cursorly/web-components
  • Add this line of code somewhere in your main entry file
import {defineCustomElements} from '@cursorly/web-components/dist/components/index';

defineCustomElements();

Once you import the components, you can use them in your HTML.

<cursorly-spinner></cursorly-spinner>

Development

The web components are built with StencilJS. We also use Storybook for building components in isolation.

To run this repo, open 2 terminals and run the following commands:

  • Terminal 1 -> yarn start
  • Terminal 2 -> yarn storybook
  • Navigate to http://localhost:6006 to see the components

To execute unit tests run yarn test.

There is also a handy script for creating new components. This script will also create an accompanying story in Storybook. The usage is:

./generate-component.sh my-component MyComponent

1.0.3

11 months ago

1.0.2

12 months ago

1.0.1

12 months ago

0.0.6-alpha.10

12 months ago

0.0.6-alpha.9

12 months ago

0.0.6-alpha.8

12 months ago

0.0.6-alpha.7

1 year ago

0.0.6-alpha.6

1 year ago

0.0.6-alpha.5

1 year ago

0.0.6-alpha.4

1 year ago