Skip to content

Commit

Permalink
Fix svgr template when no theme (#7076)
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanjeffers authored Jan 4, 2024
1 parent c92b4c6 commit a065073
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions svgr-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ const ${variables.componentName} = forwardRef((${variables.props}, ref) => {
...other
} = props
const height = heightProp ?? theme.iconSizes[sizeH ?? size]
const height = heightProp ?? theme.iconSizes?.[sizeH ?? size]
if (height) {
other.height = height
}
const width = widthProp ?? theme.iconSizes[sizeW ?? size]
const width = widthProp ?? theme.iconSizes?.[sizeW ?? size]
if (width) {
other.width = width
}
const fillColor = other.fill ?? theme.color.icon[color] ?? 'red'
const fillColor = other.fill ?? theme.color?.icon[color] ?? 'red'
${native ? nativeStyles : webStyles}
Expand Down

0 comments on commit a065073

Please sign in to comment.