diff --git a/docs/src/components/theme-switcher.njk b/docs/src/components/theme-switcher.njk new file mode 100644 index 0000000..f54e4dd --- /dev/null +++ b/docs/src/components/theme-switcher.njk @@ -0,0 +1,53 @@ +--- +layout: layouts/page.njk +title: Theme Switcher +description: A component that allows the user to switch between light and dark mode. +toc: + - label: Usage + id: usage + - label: Examples + id: examples + children: + - label: Default + id: example-default + - label: Right + id: example-right + - label: Bottom + Start + id: example-bottom-start +--- + +{% from "macros/code_preview.njk" import code_preview %} +{% from "macros/code_block.njk" import code_block %} + +{% set code %}{% endset %} +{{ code_preview("button", code) }} + +
On any element, set the value of the data-tooltip attribute to the text you want to display in the tooltip. Additionally, you can set:
data-side attribute to top, bottom, left, or right to change the side of the tooltip.data-align attribute to start, center, or end to change the alignment of the tooltip.