JS-Tech/resj

View on GitHub
app/javascript/controllers/header_controller.js

Summary

Maintainability
A
1 hr
Test Coverage
import { Controller } from "stimulus"

export default class SearchController extends Controller {
  static targets = ["container", "open", "close"]

  close() {
    this.containerTarget.style.display = "none";
    this.openTarget.style.display = "block";
  }

  open() {
    this.containerTarget.style.display = "flex";
    this.openTarget.style.display = "none";
  }
}