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 { Box, Text } from '../index.js'
import React from 'react';
import { Box, Text } from '../index.js';
type Props = {
query: string
placeholder?: string
isFocused: boolean
isTerminalFocused: boolean
prefix?: string
width?: number | string
cursorOffset?: number
borderless?: boolean
}
query: string;
placeholder?: string;
isFocused: boolean;
isTerminalFocused: boolean;
prefix?: string;
width?: number | string;
cursorOffset?: number;
borderless?: boolean;
};
export function SearchBox({
query,
@@ -22,7 +22,7 @@ export function SearchBox({
cursorOffset,
borderless = false,
}: Props): React.ReactNode {
const offset = cursorOffset ?? query.length
const offset = cursorOffset ?? query.length;
return (
<Box
@@ -41,12 +41,8 @@ export function SearchBox({
isTerminalFocused ? (
<>
<Text>{query.slice(0, offset)}</Text>
<Text inverse>
{offset < query.length ? query[offset] : ' '}
</Text>
{offset < query.length && (
<Text>{query.slice(offset + 1)}</Text>
)}
<Text inverse>{offset < query.length ? query[offset] : ' '}</Text>
{offset < query.length && <Text>{query.slice(offset + 1)}</Text>}
</>
) : (
<Text>{query}</Text>
@@ -67,5 +63,5 @@ export function SearchBox({
)}
</Text>
</Box>
)
);
}