demarches-normaliennes/app/javascript/new_design/state-button.js
2018-10-10 15:05:51 +02:00

12 lines
369 B
JavaScript

import { show, hide } from '@utils';
export function showMotivation(event, state) {
event.preventDefault();
show(document.querySelector(`.motivation.${state}`));
hide(document.querySelector('.dropdown-items'));
}
export function motivationCancel() {
document.querySelectorAll('.motivation').forEach(hide);
show(document.querySelector('.dropdown-items'));
}