Skip to content

Instantly share code, notes, and snippets.

View ordinz's full-sized avatar
🌴
deploying things

Ordin ordinz

🌴
deploying things
View GitHub Profile
@ordinz
ordinz / modal_controller.js
Created March 19, 2021 07:46
Extend Modal from "tailwindcss-stimulus-components"
import {Modal} from "tailwindcss-stimulus-components"
export default class extends Modal {
connect(){
this.element[this.identifier] = this
this.toggleClass = 'hidden'
}
}
@ordinz
ordinz / capybara_spec.rb
Created April 4, 2022 09:06
Rails Capybara has class
css_class = 'hello'
script = "document.querySelector('#{query}').classList"
expect(page.evaluate_script(script)).to have_text(css_class)