set up new workflow and migrate to .forgejo dir (#5)
Some checks failed
Deploy / deploy (push) Failing after 39s
Some checks failed
Deploy / deploy (push) Failing after 39s
Co-authored-by: Benjamin Palko <benjaminpalko@hotmail.com> Reviewed-on: #5
This commit is contained in:
parent
c37955c51b
commit
f526f5c0aa
99 changed files with 1866 additions and 1470 deletions
|
|
@ -1,33 +1,39 @@
|
|||
### swap
|
||||
|
||||
Swap allows you to toggle the visibility of two elements using a checkbox or a class name
|
||||
|
||||
[swap docs](https://daisyui.com/components/swap/)
|
||||
|
||||
#### Class Names:
|
||||
|
||||
- Component: `swap`
|
||||
- Part: `swap-on`, `swap-off`, `swap-indeterminate`
|
||||
- Modifier: `swap-active`
|
||||
- Style: `swap-rotate`, `swap-flip`
|
||||
|
||||
#### Syntax
|
||||
|
||||
Using checkbox
|
||||
|
||||
```html
|
||||
<label class="swap {MODIFIER}">
|
||||
<input type="checkbox" />
|
||||
<div class="swap-on">{content when active}</div>
|
||||
<div class="swap-off">{content when inactive}</div>
|
||||
<input type="checkbox" />
|
||||
<div class="swap-on">{content when active}</div>
|
||||
<div class="swap-off">{content when inactive}</div>
|
||||
</label>
|
||||
```
|
||||
|
||||
Using class name
|
||||
|
||||
```html
|
||||
<div class="swap {MODIFIER}">
|
||||
<div class="swap-on">{content when active}</div>
|
||||
<div class="swap-off">{content when inactive}</div>
|
||||
<div class="swap-on">{content when active}</div>
|
||||
<div class="swap-off">{content when inactive}</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
#### Rules
|
||||
|
||||
- {MODIFIER} is optional and can have one of the modifier/style class names
|
||||
- Use only a hidden checkbox to control swap state or add/remove the `swap-active` class using JS to control state
|
||||
- To show something when the checkbox is indeterminate, use `swap-indeterminate` class
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue