style: 格式化 packages/@ant/ 下所有文件以通过 biome ci

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
claude-code-best
2026-05-01 21:55:51 +08:00
parent c32f26cf21
commit 9ea9859dce
92 changed files with 5903 additions and 5188 deletions

View File

@@ -1,21 +1,17 @@
import type { ReactNode } from 'react'
import React from 'react'
import { supportsHyperlinks } from '../core/supports-hyperlinks.js'
import Text from './Text.js'
import type { ReactNode } from 'react';
import React from 'react';
import { supportsHyperlinks } from '../core/supports-hyperlinks.js';
import Text from './Text.js';
export type Props = {
readonly children?: ReactNode
readonly url: string
readonly fallback?: ReactNode
}
readonly children?: ReactNode;
readonly url: string;
readonly fallback?: ReactNode;
};
export default function Link({
children,
url,
fallback,
}: Props): React.ReactNode {
export default function Link({ children, url, fallback }: Props): React.ReactNode {
// Use children if provided, otherwise display the URL
const content = children ?? url
const content = children ?? url;
if (supportsHyperlinks()) {
// Wrap in Text to ensure we're in a text context
@@ -24,8 +20,8 @@ export default function Link({
<Text>
<ink-link href={url}>{content}</ink-link>
</Text>
)
);
}
return <Text>{fallback ?? content}</Text>
return <Text>{fallback ?? content}</Text>;
}