PromucFlow_constructor/app/client/packages
Hetu Nandu 7cdee43f13
feat: add CodeBlock component for syntax highlighting (#40223)
## Description

- Introduced a new CodeBlock component that utilizes
react-syntax-highlighter for displaying code snippets with syntax
highlighting.
- Implemented responsive theming based on the current theme context
(dark/light).
- Added Storybook stories for the CodeBlock component to demonstrate its
usage and capabilities.

This addition enhances the design system by providing a reusable
component for code display.


## Automation

/ok-to-test tags="@tag.Anvil"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/14402871511>
> Commit: 81bb9cf84ab73e43edf8c59c6d8ecff03cb5eae0
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=14402871511&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Anvil`
> Spec:
> <hr>Fri, 11 Apr 2025 12:40:24 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a new CodeBlock component that renders code snippets with
syntax highlighting and theme support (light/dark modes).
  - Enabled customizable styling and behavior through property options.
- Added interactive examples for previewing different code formats and
sizes.
- Consolidated access to the CodeBlock component through new export
statements in the design system.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-11 18:39:55 +05:30
..
ast chore: upgrade version of acorn and acron walk (#37641) 2024-11-22 01:53:58 +05:30
design-system feat: add CodeBlock component for syntax highlighting (#40223) 2025-04-11 18:39:55 +05:30
dsl fix: resolve empty table dropdown issue with dynamic select options in add new row functionality (#37108) 2025-02-25 10:38:38 +01:00
eslint-plugin chore: add custom consistent-storybook-title rule (#38241) 2024-12-19 10:22:39 +03:00
icons chore: Remove AI avatar from Icons package (#39687) 2025-03-12 12:56:46 +01:00
rts chore: ab test simple git reset in git status api (#39959) 2025-04-01 21:36:08 +05:30
storybook chore: Adjust default Anvil/WDS border radius (#40088) 2025-04-04 17:38:57 +05:30
utils chore: shift the chat button when scrollbar shows (#39559) 2025-03-05 16:34:50 +05:30