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,16 +1,16 @@
import React from 'react'
import Text from '../components/Text.js'
import React from 'react';
import Text from '../components/Text.js';
type Props = {
/** The key or chord to display (e.g., "ctrl+o", "Enter", "↑/↓") */
shortcut: string
shortcut: string;
/** The action the key performs (e.g., "expand", "select", "navigate") */
action: string
action: string;
/** Whether to wrap the hint in parentheses. Default: false */
parens?: boolean
parens?: boolean;
/** Whether to render the shortcut in bold. Default: false */
bold?: boolean
}
bold?: boolean;
};
/**
* Renders a keyboard shortcut hint like "ctrl+o to expand" or "(tab to toggle)"
@@ -35,24 +35,19 @@ type Props = {
* </Byline>
* </Text>
*/
export function KeyboardShortcutHint({
shortcut,
action,
parens = false,
bold = false,
}: Props): React.ReactNode {
const shortcutText = bold ? <Text bold>{shortcut}</Text> : shortcut
export function KeyboardShortcutHint({ shortcut, action, parens = false, bold = false }: Props): React.ReactNode {
const shortcutText = bold ? <Text bold>{shortcut}</Text> : shortcut;
if (parens) {
return (
<Text>
({shortcutText} to {action})
</Text>
)
);
}
return (
<Text>
{shortcutText} to {action}
</Text>
)
);
}