clack icon indicating copy to clipboard operation
clack copied to clipboard

[Request] Multiline message

Open kwaa opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe.

Currently, the left decorative line is not displayed when using \n line break.

import { confirm } from '@clack/prompts'

const msg = await confirm({
  message: 'Hello,\nWorld!',
}),
◆  Hello,
World!
│  ● Yes / ○ No
└

Describe the solution you'd like

Let message accept string[], like this:

import { confirm } from '@clack/prompts'

const msg = await confirm({
  message: ['Hello,', 'World!'],
}),
◆  Hello,
│  World!
│  ● Yes / ○ No
└

kwaa avatar Mar 06 '23 07:03 kwaa