Skip to content

Commit

Permalink
Add autoanimate component
Browse files Browse the repository at this point in the history
  • Loading branch information
lazaronixon committed Nov 23, 2024
1 parent c82a5d4 commit 5a85585
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## [Unreleased]
- Add autoanimate component

## [0.0.65] - 2024-11-22
- Small refactor on sortable_controller
Expand Down
2 changes: 1 addition & 1 deletion lib/generators/css_zero/add/USAGE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Description:
This will add components into your project.

Components:
accordion alert autosave avatar badge breadcrumb button card carousel chart check_all combobox command collapsible datepicker dialog dropdown flash form fullscreen hotkey input input_concerns inputmask layouts lightbox local_time navigation pagination progress prose sheet skeleton sortable switch table tabs tooltip trix upload_preview toggle web_share
accordion alert autoanimate autosave avatar badge breadcrumb button card carousel chart check_all combobox command collapsible datepicker dialog dropdown flash form fullscreen hotkey input input_concerns inputmask layouts lightbox local_time navigation pagination progress prose sheet skeleton sortable switch table tabs tooltip trix upload_preview toggle web_share

Example:
bin/rails generate css_zero:add [components...]
2 changes: 2 additions & 0 deletions lib/generators/css_zero/add/resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ accordion:
- app/assets/images/chevron-down.svg
alert:
- app/assets/stylesheets/alert.css
autoanimate:
- app/javascript/controllers/autoanimate_controller.js
autosave:
- app/javascript/controllers/autosave_controller.js
avatar:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Controller } from "@hotwired/stimulus"
import autoAnimate from "https://cdn.skypack.dev/@formkit/[email protected]"

export default class extends Controller {
connect() {
autoAnimate(this.element)
}
}

0 comments on commit 5a85585

Please sign in to comment.