Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@commercetools-uikit/link-button

Package Overview
Dependencies
Maintainers
4
Versions
908
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commercetools-uikit/link-button

#### Description

  • 10.16.1-canary.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4K
increased by39.89%
Maintainers
4
Weekly downloads
 
Created
Source
Description

Link buttons are similar to Flat buttons, however they are constructed as a <Link> and they do not have types. They also support an isExternal prop. When passed, the Link button is then constructed with a <a> instead of the default <Link> tag.

Requires react-router.

Usage
import LinkButton from '@commercetools-uikit/link-button';

<LinkButton
  to={'/foo/bar'}
  iconLeft={<AddIcon />}
  label="A label text"
  isDisabled={false}
/>

<LinkButton
  to={'https://kanyetothe.com'}
  iconLeft={<SupportIcon />}
  label="A label text"
  isDisabled={false}
  isExternal={true}
/>
Properties
PropsTypeRequiredValuesDefaultDescription
labelstring--Should describe what the button is for
tostring or { pathname: String, search: String, query: Object }--The URL that the Link should point to
iconLeftelement---The icon of the button
isDisabledboolean--falseTells when the button should present a disabled state
isExternalboolean--falseIf true, a regular is rendered instead of the default React Router Link

The component further forwards all remaining props to the underlying component.

Main Functions and use cases are:

  • Back to list example: a link to going back to another page

FAQs

Package last updated on 09 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc