From 4f387d342efc34e55f4f935c5608617281a6d08a Mon Sep 17 00:00:00 2001 From: Nikhil Rao Date: Tue, 6 Dec 2022 17:54:12 -0800 Subject: [PATCH] Fix code block styling (#34) --- pynecone/components/datadisplay/code.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pynecone/components/datadisplay/code.py b/pynecone/components/datadisplay/code.py index e9d02a0dc..c413134a8 100644 --- a/pynecone/components/datadisplay/code.py +++ b/pynecone/components/datadisplay/code.py @@ -59,7 +59,7 @@ class CodeBlock(Component): The text component. """ # 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. for key, value in props.items(): @@ -70,6 +70,7 @@ class CodeBlock(Component): return super().create( *children, **props, + custom_style=custom_style, ) def _add_style(self, style):