Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(bs5): change no-gutters class to gx-0 #2119

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Row.js
@@ -1,14 +1,14 @@
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { mapToCssModules, tagPropType } from './utils';
import { mapToCssModules, tagPropType, deprecated } from './utils';

const rowColWidths = ['xs', 'sm', 'md', 'lg', 'xl'];
const rowColsPropType = PropTypes.oneOfType([PropTypes.number, PropTypes.string]);

const propTypes = {
tag: tagPropType,
noGutters: PropTypes.bool,
noGutters: deprecated(PropTypes.bool, "Please use Bootstrap 5 gutter utility classes. https://getbootstrap.com/docs/5.0/layout/gutters/"),
className: PropTypes.string,
cssModule: PropTypes.object,
form: PropTypes.bool,
Expand Down Expand Up @@ -52,7 +52,7 @@ const Row = (props) => {

const classes = mapToCssModules(classNames(
className,
noGutters ? 'no-gutters' : null,
noGutters ? 'gx-0' : null,
kyletsang marked this conversation as resolved.
Show resolved Hide resolved
form ? 'form-row' : 'row',
colClasses
), cssModule);
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/Row.spec.js
Expand Up @@ -22,10 +22,10 @@ describe('Row', () => {
expect(wrapper.hasClass('row')).toBe(true);
});

it('show render noGutters classes', () => {
it('show render noGutters class as gx-0', () => {
const wrapper = shallow(<Row noGutters />);

expect(wrapper.hasClass('no-gutters')).toBe(true);
expect(wrapper.hasClass('gx-0')).toBe(true);
expect(wrapper.hasClass('row')).toBe(true);
});

Expand Down