Skip to content

TODOvue/todovue-theme-button

Repository files navigation

TODOvue logo

TODOvue ThemeButton

TvThemeButton is a custom theme button component for web applications.

npm Netlify Status npm npm GitHub GitHub Release Date

Table of Contents

Installation

Install with npm or yarn

npm install @todovue/tvthemebutton
yarn add @todovue/tvthemebutton

Import

import TvThemeButton from '@todovue/tvthemebutton'

You can also import it directly in the main.js file, so you don't have to import it in the pages

import { createApp } from "vue";
import App from "./App.vue";
import TvThemeButton from '@todovue/tvthemebutton'

const app = createApp(App);
app.component("TvThemeButton", TvThemeButton);
app.mount("#app");

Usage

<template>
  <tv-theme-button
    @change-theme="changeValue"
  />
</template>

<script setup>
import TvThemeButton from "@todovue/tvthebutton";

const changeValue = (value) => {
  console.log(value); // return light or dark
};
</script>

Events

Name Description
change-theme Return the value of the theme selected.

Development

Clone the repository and install the dependencies

git clone https://github.com/TODOvue/todovue-theme-button.git
cd todovue-theme-button
yarn install

License

MIT