Skip to content

Commit 8c34931

Browse files
committed
update docusaurus
1 parent 8a625e3 commit 8c34931

File tree

2 files changed

+29
-3
lines changed

2 files changed

+29
-3
lines changed

website/src/components/Rule.tsx

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,15 @@ export const Rule = ({ children, href, prefix }: RuleProps) => {
3636
<AnimateHeight duration={500} easing="ease" height={isRuleExpanded ? 'auto' : 0}>
3737
<div className="rounded-md border-0 border-l-[5px] border-solid border-neutral-500 bg-gray-200 p-2 text-xs italic text-neutral-600 dark:border-gray-200 dark:bg-neutral-600 dark:text-gray-200 [&_p]:mb-0">
3838
<a
39-
className="text-sm font-medium text-blue-600 hover:text-blue-700 hover:underline dark:text-blue-400 dark:hover:text-blue-500"
39+
className="inline-flex items-center text-sm font-medium text-blue-600 hover:text-blue-700 hover:underline dark:text-blue-400 dark:hover:text-blue-500"
4040
href={href}
4141
rel="noopener noreferrer"
4242
target="_blank"
4343
>
44-
Rule
44+
<span>Rule</span>
45+
<span className="ml-0.5 flex items-center">
46+
<ExternalLinkIcon />
47+
</span>
4548
</a>
4649
<CodeBlock className="!mb-0 mt-1 text-sm" language="ts" title="eslint.config.mjs">
4750
{children}
@@ -52,3 +55,26 @@ export const Rule = ({ children, href, prefix }: RuleProps) => {
5255
</div>
5356
);
5457
};
58+
59+
const ExternalLinkIcon = () => (
60+
<svg
61+
aria-hidden="true"
62+
className="inline-block"
63+
fill="none"
64+
height="15px"
65+
viewBox="0 0 24 24"
66+
width="15px"
67+
xmlns="http://www.w3.org/2000/svg"
68+
>
69+
<g id="Interface / External_Link">
70+
<path
71+
d="M10.0002 5H8.2002C7.08009 5 6.51962 5 6.0918 5.21799C5.71547 5.40973 5.40973 5.71547 5.21799 6.0918C5 6.51962 5 7.08009 5 8.2002V15.8002C5 16.9203 5 17.4801 5.21799 17.9079C5.40973 18.2842 5.71547 18.5905 6.0918 18.7822C6.5192 19 7.07899 19 8.19691 19H15.8031C16.921 19 17.48 19 17.9074 18.7822C18.2837 18.5905 18.5905 18.2839 18.7822 17.9076C19 17.4802 19 16.921 19 15.8031V14M20 9V4M20 4H15M20 4L13 11"
72+
id="Vector"
73+
stroke="currentColor"
74+
strokeLinecap="round"
75+
strokeLinejoin="round"
76+
strokeWidth="2"
77+
/>
78+
</g>
79+
</svg>
80+
);

website/src/pages/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ TypeScript provides two options for defining types: `type` and `interface`. Whil
440440

441441
<Rule
442442
prefix="Define all types using type alias"
443-
href="https://typescript-eslint.io/rules/consistent-type-definitions/#type"
443+
href="https://typescript-eslint.io/rules/consistent-type-definitions"
444444
>{`'@typescript-eslint/consistent-type-definitions': ['error', 'type']`}</Rule>
445445

446446
<Note>

0 commit comments

Comments
 (0)