Skip to content

Commit

Permalink
feat(bs5): Support xxl breakpoint
Browse files Browse the repository at this point in the history
Support xxl breakpoint in Col, Label, Row
  • Loading branch information
gthomas-appfolio authored and phwebi committed Oct 27, 2021
1 parent a580f23 commit 4fb7cdd
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 5 deletions.
4 changes: 3 additions & 1 deletion docs/lib/Components/LayoutPage.js
Expand Up @@ -44,7 +44,8 @@ export default class LayoutsPage extends React.Component {
sm: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
md: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
lg: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
xl: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
xl: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
xxl: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
}`}
</PrismCode>
</pre>
Expand Down Expand Up @@ -73,6 +74,7 @@ Col.propTypes = {
md: columnProps,
lg: columnProps,
xl: columnProps,
xxl: columnProps,
// override the predefined width (the ones above) with your own custom widths.
// see https://github.com/reactstrap/reactstrap/issues/297#issuecomment-273556116
widths: PropTypes.array,
Expand Down
1 change: 1 addition & 0 deletions docs/lib/examples/ContainerResponsive.js
Expand Up @@ -9,6 +9,7 @@ const Example = (props) => {
<Container className="themed-container" fluid="md">.container-md</Container>
<Container className="themed-container" fluid="lg">.container-lg</Container>
<Container className="themed-container" fluid="xl">.container-xl</Container>
<Container className="themed-container" fluid="xxl">.container-xxl</Container>
<Container className="themed-container" fluid={true}>.container-fluid</Container>
</>
);
Expand Down
3 changes: 2 additions & 1 deletion src/Col.js
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import classNames from 'classnames';
import { mapToCssModules, tagPropType, isObject } from './utils';

const colWidths = ['xs', 'sm', 'md', 'lg', 'xl'];
const colWidths = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
const stringOrNumberProp = PropTypes.oneOfType([PropTypes.number, PropTypes.string]);

const columnProps = PropTypes.oneOfType([
Expand All @@ -24,6 +24,7 @@ const propTypes = {
md: columnProps,
lg: columnProps,
xl: columnProps,
xxl: columnProps,
className: PropTypes.string,
cssModule: PropTypes.object,
widths: PropTypes.array,
Expand Down
3 changes: 2 additions & 1 deletion src/Label.js
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import classNames from 'classnames';
import { mapToCssModules, tagPropType, isObject } from './utils';

const colWidths = ['xs', 'sm', 'md', 'lg', 'xl'];
const colWidths = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];

const stringOrNumberProp = PropTypes.oneOfType([PropTypes.number, PropTypes.string]);

Expand Down Expand Up @@ -32,6 +32,7 @@ const propTypes = {
md: columnProps,
lg: columnProps,
xl: columnProps,
xxl: columnProps,
widths: PropTypes.array,
};

Expand Down
5 changes: 3 additions & 2 deletions src/Row.js
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import classNames from 'classnames';
import { mapToCssModules, tagPropType, deprecated } from './utils';

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

const propTypes = {
Expand All @@ -16,7 +16,8 @@ const propTypes = {
sm: rowColsPropType,
md: rowColsPropType,
lg: rowColsPropType,
xl: rowColsPropType
xl: rowColsPropType,
xxl: rowColsPropType
};

const defaultProps = {
Expand Down
1 change: 1 addition & 0 deletions types/lib/Col.d.ts
Expand Up @@ -20,6 +20,7 @@ export interface ColProps extends React.HTMLAttributes<HTMLDivElement> {
md?: ColumnProps;
lg?: ColumnProps;
xl?: ColumnProps;
xxl?: ColumnProps;

// custom widths
widths?: string[];
Expand Down
1 change: 1 addition & 0 deletions types/lib/Label.d.ts
Expand Up @@ -18,6 +18,7 @@ export interface LabelProps
md?: ColumnProps;
lg?: ColumnProps;
xl?: ColumnProps;
xxl?: ColumnProps;

// custom widths
widths?: string[];
Expand Down
1 change: 1 addition & 0 deletions types/lib/Row.d.ts
Expand Up @@ -15,6 +15,7 @@ export interface RowProps
md?: number | string;
lg?: number | string;
xl?: number | string;
xxl?: number | string;
}

declare class Row extends React.Component<RowProps> {}
Expand Down
3 changes: 3 additions & 0 deletions types/reactstrap-tests.tsx
Expand Up @@ -2150,6 +2150,9 @@ const ExampleResponsiveContainer = (props: any) => {
<Container className="themed-container" fluid="xl">
.container-xl
</Container>
<Container className="themed-container" fluid="xxl">
.container-xxl
</Container>
<Container className="themed-container" fluid={true}>
.container-fluid
</Container>
Expand Down

0 comments on commit 4fb7cdd

Please sign in to comment.