From 6d47dcf46bcf0a5cac2fcb07147dff1d5c15305c Mon Sep 17 00:00:00 2001 From: Weronika Olejniczak Date: Fri, 22 Nov 2024 11:20:21 +0100 Subject: [PATCH] feat(docs): update the docs with customCopyAriaLabel prop --- .../docs/components/editors_and_syntax/code.mdx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/website/docs/components/editors_and_syntax/code.mdx b/packages/website/docs/components/editors_and_syntax/code.mdx index da00df04004..01d9aad2a38 100644 --- a/packages/website/docs/components/editors_and_syntax/code.mdx +++ b/packages/website/docs/components/editors_and_syntax/code.mdx @@ -93,6 +93,20 @@ export default () => ( ``` +You can specify a custom aria label for the Copy button using the `customCopyAriaLabel` prop. It works in conjunction with the `isCopyable` prop. + +```tsx +import React from 'react'; +import { EuiCodeBlock } from '@elastic/eui'; + +export default () => ( + + {...} + +); + +``` + For long content, you can set an `overflowHeight` which will scroll if the text exceeds that height, and allows users to view the code in fullscreen mode. ```tsx interactive