Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancement #337 - Add ability to toggle link underline #338

Merged
merged 2 commits into from
Jun 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
169 changes: 136 additions & 33 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dassana-io/web-components",
"version": "0.11.1",
"version": "0.11.2",
"publishConfig": {
"registry": "https://npm.pkg.github.com/dassana-io"
},
Expand Down
9 changes: 7 additions & 2 deletions src/components/Link/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ export interface SharedLinkProps extends CommonComponentProps {
* Where to open the linked url - either in a new tab or the current browsing context.
*/
target?: LinkTargetType
/**
* Whether or not the link is underlined.
*/
underline?: boolean
}

interface LinkHref extends SharedLinkProps {
Expand All @@ -62,7 +66,8 @@ export const Link: FC<LinkProps> = ({
dataTag,
href,
onClick,
target = '_self'
target = '_self',
underline = true
}: LinkProps) => {
useStyles()

Expand All @@ -74,7 +79,7 @@ export const Link: FC<LinkProps> = ({
href={href}
onClick={onClick}
target={target}
underline={true}
underline={underline}
{...getDataTestAttributeProp('link', dataTag)}
>
{children}
Expand Down