# @govuk-frederic/arrow-left

> Left-pointing arrow icon inside circle, with customisable color, width and fill.

Latest version **0.2.0** (published 2019-02-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @govuk-frederic/arrow-left
pnpm add @govuk-frederic/arrow-left
yarn add @govuk-frederic/arrow-left
bun add @govuk-frederic/arrow-left
```

## 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.2.0 |
| Published | 2019-02-13 |
| First published | 2018-07-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 61.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mark Chambers |
| Maintainers | loque-, penx, petelockey, steve_sims |

## Links

- npm: https://www.npmjs.com/package/@govuk-frederic/arrow-left
- Homepage: https://github.com/stevesims/govuk-frederic/tree/master/components/arrow-left
- npm.io page: https://npm.io/package/@govuk-frederic/arrow-left

## Dependencies (2)

- [govuk-colours](https://npm.io/package/govuk-colours.md) ^1.0.3
- [@govuk-react/constants](https://npm.io/package/@govuk-react/constants.md) ^0.6.0-alpha.1

## Recent versions

- 0.2.0 (latest) — 2019-02-13
- 0.1.1 — 2018-08-24
- 0.1.0 — 2018-08-21
- 0.0.4 — 2018-08-07
- 0.0.3 — 2018-07-30
- 0.0.2 — 2018-07-17

## README

ArrowLeft
=========

### Import
```js
  import ArrowLeft from '@govuk-frederic/arrow-left';
```
<!-- STORY -->

### Usage

Simple
```jsx
<ArrowLeft />
```

Dark background
```jsx
import { GREY_1 } from 'govuk-colours';

const darkBackground = {
  backgroundColor: GREY_1,
  minHeight: '320px',
  minWidth: '320px',
  padding: '20px',
};

<div style={darkBackground}>
 <ArrowLeft width={28} fill="white" />
</div>
```

Light background
```jsx
import { WHITE } from 'govuk-colours';

const lightBackground = {
 backgroundColor: WHITE,
 minHeight: '320px',
 minWidth: '320px',
 padding: '20px',
};

<div style={lightBackground}>
 <ArrowLeft width={28} fill="black" />
</div>
```

Dark background & title
```jsx
import { GREY_1 } from 'govuk-colours';

const darkBackground = {
 backgroundColor: GREY_1,
 minHeight: '320px',
 minWidth: '320px',
 padding: '20px',
};

<div style={darkBackground}>
 <ArrowLeft width={28} fill="white" color="white">
   Back to previous page
 </ArrowLeft>
</div>
```

Light background & title
```jsx
import { WHITE } from 'govuk-colours';

const lightBackground = {
  backgroundColor: WHITE,
  minHeight: '320px',
  minWidth: '320px',
  padding: '20px',
};

<div style={lightBackground}>
 <ArrowLeft width={28} fill="black">
   Back to previous page
 </ArrowLeft>
</div>
```

Wrapped with anchor with title text
```jsx
import { WHITE } from 'govuk-colours';

const lightBackground = {
 backgroundColor: WHITE,
 minHeight: '320px',
 minWidth: '320px',
 padding: '20px',
};

<div style={lightBackground}>
 <a href="http://example.com" style={{ color: '#005CA7' }}>
   <ArrowLeft width={28} fill="black">
     Back to previous page
   </ArrowLeft>
 </a>
</div>
```

Wrapped with anchor with title text on dark background
```jsx
import { GREY_1 } from 'govuk-colours';

const darkBackground = {
 backgroundColor: GREY_1,
 minHeight: '320px',
 minWidth: '320px',
 padding: '20px',
};

<div style={darkBackground}>
 <a href="http://example.com" style={{ color: 'white' }}>
   <ArrowLeft width={28} fill="white">
     Back to previous page
   </ArrowLeft>
 </a>
</div>
```

Passing down onClick with title text
```jsx
import { GREY_1 } from 'govuk-colours';

const darkBackground = {
 backgroundColor: GREY_1,
 minHeight: '320px',
 minWidth: '320px',
 padding: '20px',
};

<div style={darkBackground}>
 <ArrowLeft width={28} fill="white" onClick={action('clicked arrow button')}>
   Back to previous page
 </ArrowLeft>
</div>
```

### Properties
Prop | Required | Default | Type | Description
:--- | :------- | :------ | :--- | :----------
 `children` |  | ```undefined``` | string | 
 `color` |  | ```undefined``` | string | 
 `fill` |  | ```BLUE``` | string | 
 `onClick` |  | ```undefined``` | func | 
 `width` |  | ```20``` | number |

---
_Source: https://npm.io/package/@govuk-frederic/arrow-left · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
