Skip to content

feat(webkit): add CodeBlock border prop + show file type in Icons docs#752

Merged
robsongajunior merged 10 commits into
devfrom
feat/code-block-border
Jul 16, 2026
Merged

feat(webkit): add CodeBlock border prop + show file type in Icons docs#752
robsongajunior merged 10 commits into
devfrom
feat/code-block-border

Conversation

@gab-az

@gab-az gab-az commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a border prop to the data/code-block component and wires it through the spec, tests, and Storybook docs — mirroring the pattern used for data/table.

  • border?: boolean (default true) on CodeBlock, mirrored to a data-border attribute with data-[border]: Tailwind variants. On by default (preserves current appearance); set :border="false" to render the block flush inside a surface that already frames it. Non-breaking.
  • Content height changed from a fixed h-[320px] to max-h-[320px], so short snippets fit their content while taller ones still scroll at 320px.
  • Spec (.specs/code-block.md): new border Props row, a Borderless story entry, updated height wording, recomputed checksum.
  • Tests: data-border present by default / absent when :border="false".
  • Webkit stories: border argType + a Borderless story.
  • Foundations Icons docs: swapped the local CodeBlock helper for the real @aziontech/webkit/code-block, and the Usage example now shows the HTML file type via a fileName: 'index.html' filename bar.

Notes

  • No new dependencies. No breaking changes (the prop defaults to the current bordered look).
  • The h-[320px]max-h-[320px] change is behavioral, not an API break; existing long-code stories remain visually unchanged (still capped at 320px + scroll). Visual-regression snapshots may want a quick re-baseline.
  • html is not in the code-block language→icon map, so index.html shows the generic pi pi-file icon; a dedicated code icon can be added in a follow-up if desired.

@gab-az
gab-az requested a review from a team as a code owner July 14, 2026 00:01
isaquebock
isaquebock previously approved these changes Jul 16, 2026
robsongajunior
robsongajunior previously approved these changes Jul 16, 2026
HerbertJulio
HerbertJulio previously approved these changes Jul 16, 2026
@robsongajunior
robsongajunior dismissed stale reviews from HerbertJulio and themself via 0ec201c July 16, 2026 19:23
@robsongajunior
robsongajunior merged commit 53e9d5e into dev Jul 16, 2026
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants