Fix bug that was applying the CSS to other active classes (#543)

This commit is contained in:
julianajlk
2021-07-14 12:25:32 -04:00
committed by GitHub
parent 28d359e715
commit f2f4f5f3a5
3 changed files with 4 additions and 4 deletions

View File

@@ -94,9 +94,9 @@ describe('Course', () => {
const notificationTrigger = screen.getByRole('button', { name: /Show notification tray/i });
expect(notificationTrigger).toBeInTheDocument();
expect(notificationTrigger).toHaveClass('active');
expect(notificationTrigger).toHaveClass('trigger-active');
fireEvent.click(notificationTrigger);
expect(notificationTrigger).not.toHaveClass('active');
expect(notificationTrigger).not.toHaveClass('trigger-active');
});
it('passes handlers to the sequence', async () => {

View File

@@ -9,7 +9,7 @@ import messages from './messages';
function NotificationTrigger({ intl, toggleNotificationTray, isNotificationTrayVisible }) {
return (
<button
className={classNames('notification-trigger-btn', { active: isNotificationTrayVisible() })}
className={classNames('notification-trigger-btn', { 'trigger-active': isNotificationTrayVisible() })}
type="button"
onClick={() => { toggleNotificationTray(); }}
aria-label={intl.formatMessage(messages.openNotificationTrigger)}

View File

@@ -14,7 +14,7 @@
}
}
.active::after {
.trigger-active::after {
content: '';
position: absolute;
border-bottom: 2px solid $primary-700;