Log snippet

A log snippet component provides a way to display a log snippet or code along with a message.

Examples

Basic log snippet

The log snippet supports several variants configurable using variant property for different scenarios. Each variant has an associated status icon and color similar to alert component.

Danger alert:Failure - check logs for details

apiVersion: helm.openshift.io/v1beta1/
  kind: HelmChartRepository
  metadata:
  name: azure-sample-repo
  spec:
  connectionConfig:
  url: https://raw.githubusercontent.com/Azure-Samples/helm-charts/master/docs

Props

LogSnippet

extends FlexProps
*required
NameTypeDefaultDescription
messagerequiredstring | React.ReactNodeMessage to appear above the log snippet
logSnippetstringLog snippet or code to be displayed
ouiaIdstring | number"LogSnippet"Custom OUIA ID
variantAlertVariantAlertVariant.dangerLog snippet alert variant