Skip to content

Commit

Permalink
docs(Link): add clarity for when icons appear
Browse files Browse the repository at this point in the history
  • Loading branch information
booc0mtaco committed Jun 10, 2024
1 parent 0bf3fbc commit cc16568
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/Link/Link-v2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export type LinkV2Props<ExtendedElement = unknown> =
*
* * **inline** - Inline link inherits the text size established within the `<p>` paragraph they are embedded in.
* * **standalone** - Users can choose from the available sizes.
*
* **Default is `"inline"`**.
*
* Note: Icons will only be visible when `"standalone"` is used
*/
context?: 'inline' | 'standalone';
/**
Expand Down Expand Up @@ -80,6 +84,7 @@ export const Link = forwardRef<HTMLAnchorElement, LinkV2Props>(
const iconSize = size && (['xl', 'lg'].includes(size) ? '1.5rem' : '1rem');

// TODO-AH: Inline links cannot be lowEmphasis (add runtime warning)
// TODO-AH: Inline links won't show icons (add runtime warning)
// TODO-AH: chevron-right only allowr when lowEmphasis is used (add runtime warning)
return (
<Component className={componentClassName} ref={ref} {...other}>
Expand Down

0 comments on commit cc16568

Please sign in to comment.