Skip to content

Commit

Permalink
🐭🐘 - Ensure size of SVG icons with no classes (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanc1 authored Nov 8, 2023
1 parent 6db9952 commit c4f154d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/violet-flies-marry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'myst-to-react': patch
---

Ensure icon is correct size without styles
6 changes: 4 additions & 2 deletions packages/myst-to-react/src/exercise.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export function Callout({
children: React.ReactNode;
dropdown?: boolean;
identifier?: string;
Icon?: (props: { className?: string }) => JSX.Element;
Icon?: (props: { width?: string; height?: string; className?: string }) => JSX.Element;
}) {
return (
<WrapperElement
Expand Down Expand Up @@ -127,8 +127,10 @@ export function Callout({
>
{Icon && (
<Icon
width="2rem"
height="2rem"
className={classNames(
'h-8 w-8 inline-block pl-2 mr-2 self-center flex-none',
'inline-block pl-2 mr-2 self-center flex-none',
classNames({
'text-gray-600': !color || color === 'gray',
'text-blue-600': color === 'blue',
Expand Down

0 comments on commit c4f154d

Please sign in to comment.