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

Function Row

src/Row.js:29–62  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

27};
28
29function Row(props) {
30 const {
31 className,
32 cssModule,
33 noGutters,
34 tag: Tag = 'div',
35 widths = rowColWidths,
36 ...attributes
37 } = props;
38
39 const colClasses = [];
40
41 widths.forEach((colWidth, i) => {
42 let colSize = props[colWidth];
43
44 delete attributes[colWidth];
45
46 if (!colSize) {
47 return;
48 }
49
50 const isXs = !i;
51 colClasses.push(
52 isXs ? `row-cols-${colSize}` : `row-cols-${colWidth}-${colSize}`,
53 );
54 });
55
56 const classes = mapToCssModules(
57 classNames(className, noGutters ? 'gx-0' : null, 'row', colClasses),
58 cssModule,
59 );
60
61 return <Tag {...attributes} className={classes} />;
62}
63
64Row.propTypes = propTypes;
65

Callers

nothing calls this directly

Calls 1

mapToCssModulesFunction · 0.90

Tested by

no test coverage detected