Skip to content

Commit

Permalink
[Fix] Vertical wizard nav + accomplish TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasklim committed Jul 10, 2020
1 parent 479fa26 commit 202e5b3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/wizard/VerticalWizardNav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,23 @@ import { ListGroup, ListGroupItem } from 'react-bootstrap';
import PropTypes from 'prop-types';
import JsonLdUtils from 'jsonld-utils';
import { ConfigurationContext } from '../../contexts/ConfigurationContext';
import FormUtils from '../../util/FormUtils';

//TODO add "disabled" to VerticalWizardNav
const VerticalWizardNav = ({ steps, onNavigate, currentStep }) => {
const { options } = useContext(ConfigurationContext);

return (
<div className="wizard-nav col-2 p-0">
<div className="wizard-nav col-2 p-0 pr-2">
<ListGroup>
{steps.map((step, index) => (
<ListGroupItem
disabled={!FormUtils.isRelevant(step)}
key={'nav' + index}
onClick={() => onNavigate(index)}
id={'wizard-nav-' + index}
action={true}
active={index === currentStep ? 'active' : ''}
variant={'default'}
>
{JsonLdUtils.getLocalized(step[JsonLdUtils.RDFS_LABEL], options.intl)}
</ListGroupItem>
Expand Down

0 comments on commit 202e5b3

Please sign in to comment.