# @dougrich/react-signin-reddit

> React component for a sign in button styled according to reddit brand guidelines

Latest version **0.1.0** (published 2019-07-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @dougrich/react-signin-reddit
pnpm add @dougrich/react-signin-reddit
yarn add @dougrich/react-signin-reddit
bun add @dougrich/react-signin-reddit
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2019-07-16 |
| First published | 2019-07-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=8 |
| Dependencies | 0 |
| Unpacked size | 133.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | dougrich |
| Maintainers | dougrich |

## Links

- npm: https://www.npmjs.com/package/@dougrich/react-signin-reddit
- Repository: https://github.com/dougrich/react-signin-reddit
- Homepage: https://github.com/dougrich/react-signin-reddit#readme
- Issues: https://github.com/dougrich/react-signin-reddit/issues
- npm.io page: https://npm.io/package/@dougrich/react-signin-reddit

## Recent versions

- 0.1.0 (latest) — 2019-07-16

## README

# react-signin-reddit

> React component for a sign in button styled according to reddit brand guidelines

[![NPM](https://img.shields.io/npm/v/@dougrich/react-signin-reddit.svg)](https://www.npmjs.com/package/@dougrich/react-signin-reddit) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

Branding guidelines found here: https://www.reddit.com/wiki/licensing

This __does__:
- provide a button that can be placed anywhere (see positioning guidelines in branding document)
- button can _either_ by a `button` tag or an `a` tag: see usage below
- provide a button style that renders a link to include roboto font for sign in (see advanced usage below)

This __does not__:
- provide any OAuth hooks or means to actually sign in (just the UX)

## Install

```bash
npm install --save @dougrich/react-signin-reddit
```

## Usage

### Simple

```jsx
import React, { Component } from 'react'

import SignInButton from '@dougrich/react-signin-reddit'

class Example extends Component {
  render () {
    return (
      <SignInButton onClick={...} />
    )
  }
}
```

### Only Light/Dark

```jsx
// light button
import SignInButton from '@dougrich/react-signin-reddit/dist/light'
// dark button
import SignInButton from '@dougrich/react-signin-reddit/dist/dark'
```

### As Link

```jsx
import React, { Component } from 'react'

import SignInButton from '@dougrich/react-signin-reddit'

class Example extends Component {
  render () {
    return (
      <SignInButton as='a' href='#' />
    )
  }
}
```

### Disabled

Note that for `a` tags only, when disabled it will remove the `href` attribute (if passed).

```jsx
import React, { Component } from 'react'

import SignInButton from '@dougrich/react-signin-reddit'

class Example extends Component {
  render () {
    return (
      <SignInButton disabled onClick={...} />
    )
  }
}
```

## License

Code is licensed under MIT © [dougrich](https://github.com/dougrich)

Images located in the `signin-assets` are taken from [here](https://www.reddit.com/wiki/licensing), available under the terms described in their brand guidlines.

---
_Source: https://npm.io/package/@dougrich/react-signin-reddit · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
