square / maker

Maker Design System by Square
https://square.github.io/maker/styleguide/latest-stable/
Other
63 stars 14 forks source link

Link #357

Closed landondurnan closed 2 years ago

landondurnan commented 2 years ago

Figma link

https://www.figma.com/file/SHY7Z7PbcVssjIJVuJ3IwU/%F0%9F%8D%81-Maker?node-id=10219%3A11929

Description

The Link component should act very similar to a native anchor tag and output that HTML in render. In addition, the Link component should provide:

Technically, very similar to our TextButton: https://square.github.io/maker/styleguide/latest-stable/#/TextButton but with less options.

The design currently doesn't have underline for the default state, but will soon be updated to show that. We also need to consider some logic for modifying the style of the output when mailto: or tel: are an aspect of the href as that's a current production feature, but not necessarily part of the current design.

API

Example of Link component in Carbon: https://carbondesignsystem.com/components/link/usage/

<m-link href="http://www.squareup.com">Home</m-link>

props:

slots:

Theme support

Should automatically inherit the primary color from the theme. Although, need to contrast check within the theme if primary as text color doesn't match contrast threshold.