@@ -2,16 +2,14 @@ import PropTypes from 'prop-types';
22import React from 'react' ;
33import classNames from 'classnames' ;
44
5+ import settings from '../../globals/js/settings' ;
6+
7+ const { prefix } = settings ;
8+
59export default class StepNavigation extends React . Component {
610 static propTypes = {
711 /**
8- * Specify the text to be read by screen-readers when visiting the <Tabs>
9- * component
10- */
11- ariaLabel : PropTypes . string ,
12-
13- /**
14- * Pass in a collection of <Tab> children to be rendered depending on the
12+ * Pass in a collection of <StepNavigationItem> children to be rendered depending on the
1513 * currently selected tab
1614 */
1715 children : PropTypes . node ,
@@ -29,14 +27,14 @@ export default class StepNavigation extends React.Component {
2927 customTabContent : PropTypes . bool ,
3028
3129 /**
32- * Specify whether the Tabs are displayed inline
30+ * Specify whether the StepNavigation will be displayed small
3331 */
34- inline : PropTypes . bool ,
32+ small : PropTypes . bool ,
3533
3634 /**
37- * Specify whether the Tab content is hidden
35+ * Specify whether the StepNavigation will be displayed vertically
3836 */
39- hidden : PropTypes . bool ,
37+ vertical : PropTypes . bool ,
4038
4139 /**
4240 * By default, this value is "navigation". You can also provide an alternate
@@ -50,34 +48,16 @@ export default class StepNavigation extends React.Component {
5048 */
5149 onClick : PropTypes . func ,
5250
53- /**
54- * Optionally provide an `onKeyDown` handler that is invoked when keyed
55- * navigation is triggered
56- */
57- onKeyDown : PropTypes . func ,
58-
5951 /**
6052 * Provide an optional handler that is called whenever the selection
6153 * changes. This method is called with the index of the tab that was
6254 * selected
6355 */
6456 onSelectionChange : PropTypes . func ,
65-
66- /**
67- * Provide a string that represents the `href` for the triggered <Tab>
68- */
69- triggerHref : PropTypes . string . isRequired ,
70-
7157 /**
7258 * Optionally provide an index for the currently selected <Tab>
7359 */
7460 selected : PropTypes . number ,
75-
76- /**
77- * Provide a description that is read out when a user visits the caret icon
78- * for the dropdown menu of items
79- */
80- iconDescription : PropTypes . string . isRequired ,
8161 } ;
8262
8363 static defaultProps = {
@@ -180,6 +160,8 @@ export default class StepNavigation extends React.Component {
180160 render ( ) {
181161 const {
182162 inline,
163+ small,
164+ vertical,
183165 className,
184166 role,
185167 selectedPage,
@@ -203,7 +185,12 @@ export default class StepNavigation extends React.Component {
203185 } ) ;
204186
205187 const classes = {
206- tabs : classNames ( 'wfp--step-navigation' , className ) ,
188+ tabs : classNames ( className , {
189+ [ `${ prefix } --step-navigation` ] : true ,
190+ [ `${ prefix } --step-navigation--vertical` ] : vertical ,
191+ [ `${ prefix } --step-navigation--small` ] : small ,
192+ [ `${ prefix } --step-navigation--regular` ] : ! small ,
193+ } ) ,
207194 tablist : classNames ( 'wfp--step-navigation__nav' , {
208195 'wfp--step-navigation__nav--hidden' : this . state . dropdownHidden ,
209196 'wfp--step-navigation__nav--inline' : inline ,
0 commit comments