6.0.11 • Published 3 years ago

@crave/farmblocks-link v6.0.11

Weekly downloads
18
License
MIT
Repository
github
Last release
3 years ago

logo-farmblocks

Farmblocks-Links

A React component to create links. See Storybook

Installation

npm install @crave/farmblocks-link

Usage

A Link renders a stylized <a> tag, which has to have a href value or a function to handle onClick, as well as a children element.

import React from "react";
import ReactDOM from "react-dom";
import Link from "@crave/farmblocks-link";
import { linkTypes } from "@crave/farmblocks-link";

const root = document.createElement("div");

ReactDOM.render(
  <Link href="#" type={linkTypes.NEUTRAL} size="14" lineHeight="1.14">
    This is a link!
  </Link>,
  root,
);

document.body.appendChild(root);

API

PropertyDescriptionType
childrenthe contents of the cardReact.Node
hrefan URI to a desired destinationstring
typethe type of link (reflects on color and text-decoration)string. One of FEATURED, NEUTRAL, NORMAL or WHITE constants from linkTypes.js or any valid CSS color
disabledindicates a disabled linkboolean
onClicka function to handle an onClick eventfunction
leftIconan icon to be placed on the left side of the linknode
rightIconan icon to be placed on the right side of the linknode
externalan indication of an external link (an icon will be placed on the right side of the link)boolean
sizea font-size css value for childrennumber
lineHeighta line-height css value for childrennumber or string
fontWeighta font-weight css value for childrennumber or string

License

MIT

6.0.11

3 years ago

6.0.10

4 years ago

6.0.9

4 years ago

6.0.6

4 years ago

6.0.5

4 years ago

6.0.3

4 years ago

6.0.4

4 years ago

6.0.2

5 years ago

6.0.1

5 years ago

6.0.0

5 years ago

5.1.6

5 years ago

5.1.5

5 years ago

5.1.4

5 years ago

5.1.3

5 years ago

5.1.2

5 years ago

5.1.1

6 years ago

5.1.0

6 years ago

5.0.3

6 years ago

5.0.2

6 years ago

5.0.1

6 years ago

5.0.0

6 years ago

4.2.6

6 years ago

4.2.5

6 years ago

4.2.4

6 years ago

4.2.3

6 years ago

4.2.2

6 years ago

4.2.2-alpha.26

6 years ago

4.2.1

6 years ago

4.2.0

6 years ago

4.1.2-alpha.1

6 years ago

4.1.1

6 years ago

4.1.1-alpha.13

6 years ago

4.1.1-alpha.12

6 years ago

4.1.0

7 years ago

4.0.4

7 years ago

4.0.3

7 years ago

4.0.2

7 years ago

4.0.1

7 years ago

4.0.0

7 years ago

3.1.8

7 years ago

3.1.7

7 years ago

3.1.6

7 years ago

3.1.5

7 years ago

3.1.4

7 years ago

3.1.3

7 years ago

3.1.2

7 years ago

3.1.1

7 years ago

3.1.0

7 years ago

3.0.2-alpha.45

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

2.2.4

7 years ago

2.2.3

7 years ago

2.2.2

7 years ago

2.2.1

7 years ago

2.2.0

7 years ago

2.1.6

7 years ago

2.1.5

7 years ago

2.1.4

7 years ago

2.1.3

7 years ago

2.1.2

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.5

7 years ago

2.0.4

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago