Обзор
CommandBlock отображает каждую переданную команду с маркером приглашения. Он не выполняет команды и не обеспечивает автоматическое копирование. Передайте в actions любой узел React, например кнопку, ссылку или статус. Текст команды использует семантику pre и code, сохраняет разрывы строк и переносится в пределах доступной ширины. Маркеры приглашения являются декоративными.
Использование
div. Используйте render, чтобы скомпоновать другой корневой элемент, например render={<section aria-label="Installation commands" />}. CommandBlockProps экспортируется из twenty-ui/components/data-display.
При миграции замените button на actions.
Свойства
ReactNode
Content beside the command lines, such as a copy button, link or status.
readonly string[]
обязательно
Command lines to display. The component prefixes each line with > and does not execute commands.
ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, {}>
Allows you to replace the component’s HTML element
with a different tag, or compose it with another component.Accepts a
ReactElement or a function that returns the element to render.