Skip to content

Commit

Permalink
Fix incorrect rendered font-size when font size is declared as an arr…
Browse files Browse the repository at this point in the history
…ay in Tailwind 2.0

This bug was introduced in v.1.6.0. Fixes #46
  • Loading branch information
rogden committed Jun 3, 2021
1 parent 3618816 commit 39a7edf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/Canvas/Sections/FontSizes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
<p
class="mb-2 leading-none text-gray-900 dark:text-gray-500"
:style="{
fontSize: value
fontSize: getFontSizeValue(value)
}"
>
{{ data.typographyExample }}
</p>
<CanvasBlockLabel
:label="`text-${prop}`"
:value="getLabelValue(value)"
:value="getFontSizeValue(value)"
/>
</div>
</div>
Expand Down Expand Up @@ -54,7 +54,7 @@ export default {
}
},
methods: {
getLabelValue (value) {
getFontSizeValue (value) {
// Tailwind 2.0 returns font size as array with size and line height
if (Array.isArray(value)) {
return value[0]
Expand Down

0 comments on commit 39a7edf

Please sign in to comment.