This repository has been archived by the owner on Jan 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 483
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add theme palette config (#511)
Signed-off-by: Ryan Wang <[email protected]>
- Loading branch information
Showing
6 changed files
with
62 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,15 @@ | ||
<template> | ||
<Story title="Button"> | ||
<Variant :init-state="initState" title="playground"> | ||
<template #default="{ state }"> | ||
<VButton :type="state.type"> Hello world </VButton> | ||
<Variant title="Type"> | ||
<template #default> | ||
<div class="themeable-default"> | ||
<VButton type="primary"> Hello world </VButton> | ||
<VButton type="secondary"> Hello world </VButton> | ||
</div> | ||
</template> | ||
</Variant> | ||
|
||
<Variant icon="carbon:star-filled" icon-color="#10B981" title="secondary"> | ||
<VButton type="secondary"> Hello world </VButton> | ||
</Variant> | ||
</Story> | ||
</template> | ||
<script setup> | ||
import { VButton } from "./index"; | ||
function initState() { | ||
return { | ||
type: "primary", | ||
}; | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,22 @@ | ||
const { themeable } = require("tailwindcss-themeable"); | ||
|
||
module.exports = { | ||
content: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}"], | ||
theme: { | ||
extend: {}, | ||
}, | ||
plugins: [], | ||
plugins: [ | ||
themeable({ | ||
defaultTheme: "default", | ||
themes: [ | ||
{ | ||
name: "default", | ||
palette: { | ||
primary: "#4CCBA0", | ||
secondary: "#0E1731", | ||
}, | ||
}, | ||
], | ||
}), | ||
], | ||
}; |