docs: remove duplicate buttons in code actions (#10061)

This commit is contained in:
Shahed Nasser
2024-11-13 10:59:14 +02:00
committed by GitHub
parent e10fb34eb9
commit 1d87459951
2 changed files with 4 additions and 1 deletions
@@ -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 = ({
</div>
)}
</div>
<CodeBlockActions {...actionsProps} />
{!hideActions && <CodeBlockActions {...actionsProps} />}
</CodeBlockHeaderWrapper>
)
}
@@ -363,6 +363,7 @@ export const CodeBlock = ({
...actionsProps,
inHeader: true,
}}
hideActions={hasTabs}
/>
)}
<div