Fix code block styling (#34)

This commit is contained in:
Nikhil Rao 2022-12-06 17:54:12 -08:00 committed by GitHub
parent dd26dd044b
commit 4f387d342e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,7 @@ class CodeBlock(Component):
The text component. The text component.
""" """
# This component handles style in a special prop. # This component handles style in a special prop.
custom_style = props.get("custom_style", {}) custom_style = props.pop("custom_style", {})
# Transfer style props to the custom style prop. # Transfer style props to the custom style prop.
for key, value in props.items(): for key, value in props.items():
@ -70,6 +70,7 @@ class CodeBlock(Component):
return super().create( return super().create(
*children, *children,
**props, **props,
custom_style=custom_style,
) )
def _add_style(self, style): def _add_style(self, style):