-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow Code Component to have custom props and extra class styles (#9960)
* Create simple react element if element has no children * Fix for when element has text * add changeset * Add additionalProps to Code component and ShikiHighlighter.highlight() * Add changeset * Create simple react element if element has no children * Fix for when element has text * add changeset * Add additionalProps to Code component and ShikiHighlighter.highlight() * Add changeset * reverted accidental changes * remove unnecessary parts * Add HTMLAttributes type to additionalProps * Update .changeset/calm-bags-deliver.md Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev> * extend HTMLAtts instead * add suggestions * feat: address reviews * chore: remove empty line * feat: move attributes to options --------- Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev> Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
- Loading branch information
1 parent
01497f2
commit c081adf
Showing
3 changed files
with
24 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@astrojs/markdown-remark": minor | ||
"astro": minor | ||
--- | ||
|
||
Allows passing any props to the `<Code />` component |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters