Code Block
EXAMPLES 1
python
print("Hello, world!")code_block(code='print("Hello, world!")', language='python', title='example.py')
USAGE
from djust_components.components.code_block import CodeBlock
component = CodeBlock(code='',
language='',
filename='',
theme='github-dark',
custom_class='',
kwargs)
html = component.render()
PARAMETERS 6
| Name | Type | Default |
|---|---|---|
code |
<class 'str'> |
'' |
language |
<class 'str'> |
'' |
filename |
<class 'str'> |
'' |
theme |
<class 'str'> |
'github-dark' |
custom_class |
<class 'str'> |
'' |
kwargs |
— |
— |