Add more comments
This commit is contained in:
@@ -6,5 +6,8 @@ Please see LICENSE in the repository root for full details.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
.external {
|
.external {
|
||||||
|
/* By default links will be blue/purple (or whatever the user agent does), but
|
||||||
|
in our designs we generally want external links to be the same color as the
|
||||||
|
surrounding text */
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ type Props = Omit<
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A version of Compound's link component that integrates with our router setup.
|
* A version of Compound's link component that integrates with our router setup.
|
||||||
|
* This is only for app-internal links.
|
||||||
*/
|
*/
|
||||||
export const Link = forwardRef<HTMLAnchorElement, Props>(function Link(
|
export const Link = forwardRef<HTMLAnchorElement, Props>(function Link(
|
||||||
{ to, state, ...props },
|
{ to, state, ...props },
|
||||||
@@ -57,6 +58,10 @@ export const Link = forwardRef<HTMLAnchorElement, Props>(function Link(
|
|||||||
return <CpdLink ref={ref} {...props} href={path} onClick={onClick} />;
|
return <CpdLink ref={ref} {...props} href={path} onClick={onClick} />;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A link to an external web page, made to fit into blocks of text more subtly
|
||||||
|
* than the normal Compound link component.
|
||||||
|
*/
|
||||||
export const ExternalLink = forwardRef<
|
export const ExternalLink = forwardRef<
|
||||||
HTMLAnchorElement,
|
HTMLAnchorElement,
|
||||||
ComponentPropsWithoutRef<"a">
|
ComponentPropsWithoutRef<"a">
|
||||||
|
|||||||
Reference in New Issue
Block a user