MCPcopy Create free account
hub / github.com/reactstrap/reactstrap / Nav

Function Nav

src/Nav.js:42–77  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

40};
41
42function Nav(props) {
43 const {
44 className,
45 cssModule,
46 tabs,
47 pills,
48 vertical = false,
49 horizontal,
50 justified,
51 fill,
52 navbar,
53 card,
54 tag: Tag = 'ul',
55 ...attributes
56 } = props;
57
58 const classes = mapToCssModules(
59 classNames(
60 className,
61 navbar ? 'navbar-nav' : 'nav',
62 horizontal ? `justify-content-${horizontal}` : false,
63 getVerticalClass(vertical),
64 {
65 'nav-tabs': tabs,
66 'card-header-tabs': card && tabs,
67 'nav-pills': pills,
68 'card-header-pills': card && pills,
69 'nav-justified': justified,
70 'nav-fill': fill,
71 },
72 ),
73 cssModule,
74 );
75
76 return <Tag {...attributes} className={classes} />;
77}
78
79Nav.propTypes = propTypes;
80

Callers

nothing calls this directly

Calls 2

mapToCssModulesFunction · 0.90
getVerticalClassFunction · 0.85

Tested by

no test coverage detected