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

How to customize style with tailwindcss? #9

Open
pheng0077 opened this issue Jul 27, 2022 · 1 comment
Open

How to customize style with tailwindcss? #9

pheng0077 opened this issue Jul 27, 2022 · 1 comment

Comments

@pheng0077
Copy link

No description provided.

@tcampbPPU
Copy link
Member

For some of the components like the <PushButton /> you can provide your own custom theme. So you can pass customTheme prop like so:

<script lang="ts" setup>
import { PushButton, PushButtonTheme } from 'tailvue'

const customTheme: PushButtonTheme = {
  primary: 'border border-transparent font-medium rounded shadow-sm text-white bg-cyan-600',
  active: 'hover:bg-cyan-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-cyan-500 focus:shadow-outline-cyan active:bg-cyan-700',
  disabled: '',
}
</script>
<template>
  <push-button :custom-theme="customTheme"> Custom Theme </push-button>
</template>

This theme has a type PushButtonTheme you can import if you are using TS to get the proper typing.

image

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

2 participants