-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add links to glossary term cards without counts (#8705)
- Loading branch information
Joshua Eilers
authored
Aug 24, 2023
1 parent
a78e72c
commit d15f080
Showing
6 changed files
with
54 additions
and
31 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
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
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
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
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,37 @@ | ||
import React, { ReactNode } from 'react'; | ||
import { ArrowRightOutlined } from '@ant-design/icons'; | ||
import { Button } from 'antd'; | ||
import styled from 'styled-components/macro'; | ||
|
||
const UrlButtonContainer = styled.span` | ||
font-size: 12px; | ||
`; | ||
|
||
const StyledButton = styled(Button)` | ||
> :hover { | ||
text-decoration: underline; | ||
} | ||
&&& { | ||
padding-bottom: 0px; | ||
} | ||
padding-left: 12px; | ||
padding-right: 12px; | ||
`; | ||
|
||
interface Props { | ||
href: string; | ||
children: ReactNode; | ||
onClick?: () => void; | ||
} | ||
|
||
const NOOP = () => {}; | ||
|
||
export default function UrlButton({ href, children, onClick = NOOP }: Props) { | ||
return ( | ||
<UrlButtonContainer> | ||
<StyledButton type="link" href={href} target="_blank" rel="noreferrer noopener" onClick={onClick}> | ||
{children} <ArrowRightOutlined style={{ fontSize: 12 }} /> | ||
</StyledButton> | ||
</UrlButtonContainer> | ||
); | ||
} |
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