Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Moved breakpoint to medium from large #169

Merged
merged 2 commits into from
May 12, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions templates/gmcq.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function Gmcq(props) {
onItemBlur
} = props;

const screenSize = device.screenSize;
const hasColumnLayout = device.isScreenSizeMin('medium');

return (
<div className='component__inner gmcq__inner'>
Expand All @@ -40,7 +40,7 @@ export default function Gmcq(props) {
!_isEnabled && 'is-disabled',
_isInteractionComplete && 'is-complete is-submitted show-user-answer',
_isCorrect && 'is-correct',
_columns && screenSize === 'large' && 'has-column-layout'
_columns && hasColumnLayout && 'has-column-layout'
])}
role={_isRadio ? 'radiogroup' : 'group'}
aria-labelledby={ariaQuestion ? null : (displayTitle || body || instruction) && `${_id}-header`}
Expand All @@ -55,7 +55,7 @@ export default function Gmcq(props) {
(_shouldShowMarking && _shouldBeSelected) ? 'is-correct' : null,
(_shouldShowMarking && !_shouldBeSelected) ? 'is-incorrect' : null
])}
style={(_columns && screenSize === 'large') ?
style={(_columns && hasColumnLayout) ?
{ width: `${100 / _columns}%` } :
null}
key={_index}
Expand Down