diff --git a/www/packages/docs-ui/src/components/CodeBlock/Header/index.tsx b/www/packages/docs-ui/src/components/CodeBlock/Header/index.tsx index b6be62c9d8511..1121c46c1e8a7 100644 --- a/www/packages/docs-ui/src/components/CodeBlock/Header/index.tsx +++ b/www/packages/docs-ui/src/components/CodeBlock/Header/index.tsx @@ -17,6 +17,7 @@ type CodeBlockHeaderProps = { title?: string blockStyle?: CodeBlockStyle actionsProps: CodeBlockActionsProps + hideActions?: boolean } & CodeBlockHeaderMeta export const CodeBlockHeader = ({ @@ -25,6 +26,7 @@ export const CodeBlockHeader = ({ badgeLabel, actionsProps, badgeColor, + hideActions = false }: CodeBlockHeaderProps) => { const { colorMode } = useColorMode() @@ -54,7 +56,7 @@ export const CodeBlockHeader = ({ )} - + {!hideActions && } ) } diff --git a/www/packages/docs-ui/src/components/CodeBlock/index.tsx b/www/packages/docs-ui/src/components/CodeBlock/index.tsx index 8d8befeab7698..eefce95c1d914 100644 --- a/www/packages/docs-ui/src/components/CodeBlock/index.tsx +++ b/www/packages/docs-ui/src/components/CodeBlock/index.tsx @@ -363,6 +363,7 @@ export const CodeBlock = ({ ...actionsProps, inHeader: true, }} + hideActions={hasTabs} /> )}