open-index/open-npm huggingface dataset:
npm package: @qonto/login-button
Description: A customizable Web Component that provides a login button with consistent Qonto styling and behavior.
Latest version: 0.5.1

# @qonto/login-button

A customizable Web Component that provides a login button with consistent Qonto styling and behavior.

## Installation

```bash
pnpm install @qonto/login-button
```

## Release

The release process is automated using [release-it](https://github.com/release-it/release-it).

```bash
pnpm release
```

For more information, please refer to the [release how-to document](https://www.notion.so/qonto/How-do-I-release-a-new-version-for-our-internal-addons-qonto-ui-kit-qonto-mirage-qonto-sca-etc-1d61cda8c1df4651b0ec33deed7d0a7c?pvs=4).

## Usage

### Module

```html
<!-- Import the web component -->
<script type="module">
  import "@qonto/login-button";
</script>

<!-- Use it in your HTML -->
<qonto-login-button href="https://app.qonto.com/signin" locale="en" />
```

### React

```bash
pnpm install @lit/react
```

```jsx
import React from "react";
import { createComponent } from "@lit/react";
import { QontoLoginButton as QontoLoginButtonWC } from "@qonto/login-button";

function App() {
  const QontoLoginButton = createComponent({
    tagName: "qonto-login-button",
    elementClass: QontoLoginButtonWC,
    react: React,
  });

  return (
    <QontoLoginButton
      href="https://app.qonto.com/signin"
      locale="en"
      onClick={() => console.log("clicked")}
    />
  );
}

export default App;
```

## Properties

| Property | Type     | Default                          | Description                                       |
| -------- | -------- | -------------------------------- | ------------------------------------------------- |
| `href`   | `string` | `'https://app.qonto.com/signin'` | The URL to redirect to when the button is clicked |
| `locale` | `string` | `'en'`                           | The locale to use for the button                  |

## Development

### Setup

```bash
pnpm install

pnpm dev
```

### Building

```bash
pnpm build
```

### Testing

```bash
pnpm test

# Or run tests in watch mode
pnpm test:watch
```

## Changelog

The changelog is automatically generated using [release-it](https://github.com/release-it/release-it) and [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog).

## Contributing

Coming soon.

## License

This project is licensed under the MIT License – see the [LICENSE.md](LICENSE.md) file for details.