package.docs.components.CodeBlock.examples.CodeBlock.md Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of patternfly Show documentation
Show all versions of patternfly Show documentation
Assets, source, tooling, and content for PatternFly 4
The newest version!
---
id: 'Code block'
section: components
cssPrefix: pf-v6-c-code-block
---## Examples
### Basic
```html
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
```
### Expandable
```html
apiVersion: helm.openshift.io/v1beta1/
kind: HelmChartRepository
metadata:
name: azure-sample-repo
```
### Expandable expanded
```html
apiVersion: helm.openshift.io/v1beta1/
kind: HelmChartRepository
metadata:
name: azure-sample-repo
```
## Documentation
### Usage
| Class | Applied to | Outcome |
| -- | -- | -- |
| `.pf-v6-c-code-block` | `` | Initiates the code block component. **Required** |
| `.pf-v6-c-code-block__header` | `` | Initiates the code block header. |
| `.pf-v6-c-code-block__actions` | `` | Initiates the code block actions. |
| `.pf-v6-c-code-block__actions-item` | `` | Initiates a code block action item. |
| `.pf-v6-c-code-block__content` | `` | Initiates the code block content. **Required** |
| `.pf-v6-c-code-block__pre` | `` | Initiates the code block `` element. **Required** |
| `.pf-v6-c-code-block__code` | `` | Initiates the code block `` element. **Required** |
© 2015 - 2025 Weber Informatics LLC | Privacy Policy