Retrospring/app/javascript/retrospring/features/locales/index.ts

12 lines
365 B
TypeScript
Raw Normal View History

2022-01-13 14:43:35 -08:00
import registerEvents from 'utilities/registerEvents';
function localeSwitchHandler(event: Event): void {
event.preventDefault();
document.querySelector('#locales-panel').classList.toggle('d-block');
}
export default (): void => {
registerEvents([
{ type: 'click', target: document.querySelector('#locale-switch'), handler: localeSwitchHandler }
]);
}