Skip to content

Commit c72c6d5

Browse files
committed
feat(swap): enhance ui
1 parent 991a0e2 commit c72c6d5

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

example/swap.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Future<void> main() async {
99

1010
final value = await commander.swap(
1111
'What is your name ?',
12-
defaultValue: true,
12+
defaultValue: true,placeholder: 'ff'
1313
);
1414

1515
print(value);

lib/src/application/components/swap.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,8 @@ final class Swap<T> with TerminalTools implements Component<bool> {
6666
SetStyles.reset,
6767
Print(' $_message'),
6868
if (_placeholder.isNotEmpty) ...[
69-
Print(' : '),
7069
SetStyles(Style.foreground(Color.brightBlack)),
71-
Print('($_placeholder)'),
70+
Print(' ($_placeholder)'),
7271
SetStyles.reset,
7372
],
7473
Print(' : '),
@@ -87,7 +86,7 @@ final class Swap<T> with TerminalTools implements Component<bool> {
8786
buffer.writeAnsiAll([
8887
AsciiControl.lineFeed,
8988
SetStyles(Style.foreground(Color.brightBlack)),
90-
Print('(Type to filter, press ←/→ to navigate, enter to confirm)'),
89+
Print('(Press ←/→ to select, enter to confirm)'),
9190
SetStyles.reset,
9291
]);
9392

0 commit comments

Comments
 (0)