-
Notifications
You must be signed in to change notification settings - Fork 751
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc64dfc
commit 339d0ef
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from "react"; | ||
import Link from "./index"; | ||
|
||
export default { | ||
title: "Link", | ||
component: Link, | ||
argTypes: { | ||
fontSize: { | ||
name: "fontSize", | ||
table: { | ||
type: { summary: "string", detail: "Fontsize in px or em" }, | ||
defaultValue: { summary: "16px" }, | ||
}, | ||
control: { | ||
type: null, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export const Default: React.FC = () => { | ||
return ( | ||
<div> | ||
<Link href="/">Default</Link> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import styled from "styled-components"; | ||
import Text from "../Text"; | ||
|
||
export interface Props { | ||
fontSize?: string; | ||
href: string; | ||
} | ||
|
||
const Link = styled(Text).attrs({ as: "a", bold: true })<Props>` | ||
color: ${({ theme }) => theme.colors.iris}; | ||
&:hover { | ||
text-decoration: underline; | ||
} | ||
`; | ||
|
||
export default Link; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters