claude-code-best/packages/@ant/ink/src/components/Newline.tsx
claude-code-best 9ea9859dce style: 格式化 packages/@ant/ 下所有文件以通过 biome ci
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 21:55:51 +08:00

18 lines
351 B
TypeScript

import React from 'react';
export type Props = {
/**
* Number of newlines to insert.
*
* @default 1
*/
readonly count?: number;
};
/**
* Adds one or more newline (\n) characters. Must be used within <Text> components.
*/
export default function Newline({ count = 1 }: Props) {
return <ink-text>{'\n'.repeat(count)}</ink-text>;
}