1.0.9 • Published 5 years ago

@anandaroop/yat v1.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

yat

Yat is a simple client-side geolocation React component, made mostly to tinker with publishing npm packages.

You don't have to be a yat to use it.

Installation

yarn add @anandaroop/yat

Basic Usage

In your html:

<div id="root">
  <!-- component will mount here  -->
</div>  

In your javascript:

import React from 'react'
import ReactDOM from 'react-dom'
import Yat from '@anandaroop/yatyat'

ReactDOM.render(
  <Yat />,
  document.querySelector('#root')
)

Resulting in the html output:

-74.9938, 39.8526

Options

Let's support both lon,lat and lat,lon ordering.

import React from 'react'
import Yat from '@anandaroop/yatyat'

MyComponent = () =>
  <div>
    <p>Here's lon,lat ordering (the default)</p>
    <Yat order="lon,lat" />

    <p>Here's lat,lon ordering</p>
    <Yat order="lat,lon" />
  </div>

Development

Component source code lives under /src/components.

Implementations, specs and stories are all co-located under each component directory.

src/components/
└── Yat
    ├── __snapshots__
    ├── index.js
    ├── spec.js
    └── stories.js

Testing

Use Jest for behavior and snapshot testing

$ yarn test

Stories

Use Storybook for a nice developer experience, and to document

$ yarn run storybook
$ open http://localhost:6006
1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

0.3.0

5 years ago

0.2.8

5 years ago

0.2.7

5 years ago

0.2.6

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago