Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TInputGroup: variants css overwrites props #57

Open
tobiasdiez opened this issue Apr 30, 2022 · 1 comment
Open

TInputGroup: variants css overwrites props #57

tobiasdiez opened this issue Apr 30, 2022 · 1 comment

Comments

@tobiasdiez
Copy link

tobiasdiez commented Apr 30, 2022

If you have a input group

<t-input-group
  label="Email address"
  variant="important"
>
  <t-input
    v-model="email"
    v-focus
  />
</t-input-group>

and style config

TInputGroup: {
    fixedClasses: {
      wrapper: '',
      label: 'block text-sm text-gray-700',
      body: 'mt-1',
      feedback: ' text-sm text-sm mt-1',
      description: 'text-gray-400 text-sm',
    },
    classes: {
      wrapper: '',
      label: '',
      body: '',
      feedback: 'text-gray-400',
      description: 'text-gray-400',
    },
    variants: {
      important: {
        label: 'font-semibold',
      },
    },
  },

then the config option label from variants > important is overwriting the prop label and font-semibold instead of Email address is the label text.

@tobiasdiez
Copy link
Author

Apparently, variantjs requires an additional classes as in

    variants: {
      important: {
        classes: {
          label: 'font-semibold',
        }
      },
    },

not sure if that's by design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant