File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -416,7 +416,7 @@ class Shellbar extends Component {
416416 { productSwitchList . map ( ( item , index ) => {
417417 return (
418418 < li
419- className = ' fd-product-switch__item'
419+ className = { ` fd-product-switch__item ${ item . selected ? 'selected' : '' } ` }
420420 key = { index }
421421 onClick = { item . callback } >
422422 < div className = { `fd-product-switch__icon sap-icon--${ item . glyph } ` } />
@@ -487,14 +487,16 @@ Shellbar.propTypes = {
487487 label : PropTypes . string . isRequired
488488 } ) ,
489489 /** Array of objects containing data about the products.
490- * Callback, title, and glyph are required; subtitle is optional. */
490+ * Callback, title, and glyph are required; selected and subtitle are optional. */
491491 productSwitchList : PropTypes . arrayOf (
492492 PropTypes . shape ( {
493493 callback : PropTypes . func . isRequired ,
494494 /** Localized text for the heading */
495495 title : PropTypes . string . isRequired ,
496496 /** The icon to include. See the icon page for the list of icons */
497497 glyph : PropTypes . string . isRequired ,
498+ /** For pre-selecting an item in the product switch list */
499+ selected : PropTypes . bool ,
498500 subtitle : PropTypes . string
499501 } )
500502 ) ,
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ export const coPilot = () => (
123123 title : 'Fiori Home' ,
124124 subtitle : 'Central Home' ,
125125 image : './assets/01.png' ,
126+ selected : true ,
126127 glyph : 'home'
127128 } ,
128129 {
You can’t perform that action at this time.
0 commit comments