(props)
| 27 | }; |
| 28 | |
| 29 | function 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 | |
| 64 | Row.propTypes = propTypes; |
| 65 |
nothing calls this directly
no test coverage detected