Skip to content

Commit

Permalink
cdeery/APER-2484/job select overflow scroll (#10)
Browse files Browse the repository at this point in the history
feat: use overflow css property to enable horizontal scrolling of job selectors
  • Loading branch information
cdeery committed Jul 19, 2023
1 parent a2ef557 commit c5144a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ $breakpoint-medium: 992px;
top: 0.5rem;
}
}
.overflow-scroll-medium {
overflow: scroll;
}
}

@media (min-width: $breakpoint-medium) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import React from 'react';
import PropTypes from 'prop-types';
import {
SelectableBox, Chip, Stack, useMediaQuery, breakpoints,
SelectableBox, Chip, Stack,
} from '@edx/paragon';
import { useIntl } from '@edx/frontend-platform/i18n';
import messages from './messages';

const RelatedSkillsSelectableBoxSet = ({ jobSkillsList, selectedJobTitle, onChange }) => {
const { formatMessage } = useIntl();
const isExtraSmall = useMediaQuery({ maxWidth: breakpoints.extraSmall.maxWidth });

const renderTopFiveSkills = (skills) => {
const topFiveSkills = skills.sort((a, b) => b.significance - a.significance).slice(0, 5);
Expand All @@ -27,7 +26,8 @@ const RelatedSkillsSelectableBoxSet = ({ jobSkillsList, selectedJobTitle, onChan
type="radio"
value={selectedJobTitle}
onChange={onChange}
columns={isExtraSmall ? 1 : 3}
columns={3}
className="overflow-scroll-medium"
>
{jobSkillsList.map(job => (
<SelectableBox
Expand Down

0 comments on commit c5144a0

Please sign in to comment.