Backpack link component.
npm install bpk-component-link --save-devimport React from 'react';
import BpkLink, { BpkButtonLink } from 'bpk-component-link';
export default () => (
<div>
Links can be both <BpkLink href="http://www.skyscanner.net/">anchor tags</BpkLink> as well
as <BpkButtonLink onClick={() => console.log('link button click!')}>button tags</BpkButtonLink>.
</div>
)| Property | PropType | Required | Default Value |
|---|---|---|---|
| children | - | true | - |
| href | string | true | - |
| onClick | func | false | null |
| blank | bool | false | false |
| rel | string | false | null |
| alternate | bool | false | false |
| Property | PropType | Required | Default Value |
|---|---|---|---|
| children | - | true | - |
| onClick | func | true | - |
| alternate | bool | false | false |
For both BpkLink and BpkButtonLink the following theme attributes are required.
linkColorlinkHoverColorlinkActiveColorlinkVisitedColor
Alternate:
linkAlternateColorlinkAlternateHoverColorlinkAlternateActiveColorlinkAlternateVisitedColor