소스 검색

Fix code block styling (#34)

Nikhil Rao 2 년 전
부모
커밋
4f387d342e
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      pynecone/components/datadisplay/code.py

+ 2 - 1
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):