Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
style(font weight): able to set font-weight for button, label and header
  • Loading branch information
lecoueyl committed Oct 12, 2021
1 parent d27fe27 commit 9726480
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/button/Button.vue
Expand Up @@ -3,7 +3,7 @@
:is="props.tag"
:ref="data.ref"
:class="[
'relative leading-tight font-medium border transition-colors duration-150 focus:outline-none shadow-sm',
'relative leading-tight font-button border transition-colors duration-150 focus:outline-none shadow-sm',
{
// busy
'animate-pulse': props.busy,
Expand Down
2 changes: 1 addition & 1 deletion src/components/input/Input.vue
Expand Up @@ -2,7 +2,7 @@
<label class="block">
<p
v-if="$slots.default"
class="text-gray-800 dark:text-gray-200 mb-1"
class="mb-1 text-gray-800 font-label dark:text-gray-200"
>
<slot />
</p>
Expand Down
2 changes: 1 addition & 1 deletion src/components/select/Select.vue
Expand Up @@ -2,7 +2,7 @@
<label class="block">
<p
v-if="$slots.label"
class="text-gray-800 dark:text-gray-200 mb-1"
class="mb-1 text-gray-800 font-label dark:text-gray-200"
>
<slot name="label" />
</p>
Expand Down
3 changes: 1 addition & 2 deletions src/components/table/TableHeader.vue
@@ -1,8 +1,7 @@
<template>
<th
class="font-medium"
:class="[
'last:pr-0',
'font-header last:pr-0',
{
// density
'py-1 pr-2': tableProps.density === 'tight',
Expand Down
2 changes: 1 addition & 1 deletion src/components/textarea/Textarea.vue
Expand Up @@ -2,7 +2,7 @@
<label class="block">
<p
v-if="$slots.default"
class="text-gray-800 dark:text-gray-200 mb-1"
class="mb-1 text-gray-800 font-label dark:text-gray-200"
>
<slot />
</p>
Expand Down
7 changes: 6 additions & 1 deletion src/tailwind-preset.js
@@ -1,5 +1,5 @@
const colors = require('tailwindcss/colors');
const { borderRadius } = require('tailwindcss/defaultTheme');
const { borderRadius, fontWeight } = require('tailwindcss/defaultTheme');
const plugin = require('tailwindcss/plugin');

module.exports = {
Expand Down Expand Up @@ -33,6 +33,11 @@ module.exports = {
button: borderRadius.lg,
form: borderRadius.md,
},
fontWeight: {
button: fontWeight.medium,
header: fontWeight.medium,
label: fontWeight.medium,
},
transitionTimingFunction: {
'in-mijin': 'cubic-bezier(0.7, 0, 0.84, 0)',
'out-mijin': 'cubic-bezier(0.16, 1, 0.3, 1)',
Expand Down

0 comments on commit 9726480

Please sign in to comment.