vadimdemedes/ink-ui

Status message and alert components have incorrect spacing after icon

sindresorhus opened this issue · 0 comments

Seems to be caused by changes in Ink 5.

  • ink-ui/test/alert.tsx

    Lines 100 to 128 in 14b1145

    test.failing('info', t => {
    const {lastFrame} = render(
    <Box width={16}>
    <Alert variant="info" title="Info">
    Message
    </Alert>
    </Box>,
    );
    t.is(
    lastFrame(),
    boxen(
    [
    `${chalk.blue(figures.info)} ${chalk.bold('Info')}`,
    '',
    ' Message',
    ].join('\n'),
    {
    borderColor: 'blue',
    borderStyle: 'round',
    width: 16,
    padding: {
    left: 1,
    right: 1,
    },
    },
    ),
    );
    });
  • test.failing('multiline message', t => {
    const {lastFrame} = render(
    <Box width={8}>
    <StatusMessage variant="info">Hello world</StatusMessage>
    </Box>,
    );
    t.is(
    lastFrame(),
    [`${chalk.blue(figures.info)} Hello`, ' world'].join('\n'),
    );
    });