diff --git a/packages/react-code-blocks/src/components/Snippet/Snippet.tsx b/packages/react-code-blocks/src/components/Snippet/Snippet.tsx index 6832c9eb..33971987 100644 --- a/packages/react-code-blocks/src/components/Snippet/Snippet.tsx +++ b/packages/react-code-blocks/src/components/Snippet/Snippet.tsx @@ -17,24 +17,23 @@ interface Props { const SnippetWrapper = styled.div< Props & { style: any; - width?: string; } >` position: relative; - width: ${({ width }) => !!width ? width : 'auto'}; + width: ${({ width }: any) => !!width ? width : 'auto'}; max-width: 100%; padding: 8pt; padding-right: calc(2 * 16pt); - color: ${({ style }) => style.color}; - background-color: ${({ style }) => style.bgColor}; - border: 1px solid ${({ style }) => style.border}; + color: ${({ style }: any) => style.color}; + background-color: ${({ style }: any) => style.bgColor}; + border: 1px solid ${({ style }: any) => style.border}; border-radius: 5px; pre { margin: 0; padding: 0; border: none; background-color: transparent; - color: ${({ style }) => style.color}; + color: ${({ style }: any) => style.color}; font-size: 0.8125rem; } pre::before { @@ -52,7 +51,7 @@ const SnippetWrapper = styled.div< right: 0; top: -2px; transform: translateY(50%); - background-color: ${({ style }) => style.bgColor}; + background-color: ${({ style }: any) => style.bgColor}; display: inline-flex; justify-content: center; align-items: center;