Skip to content

Commit

Permalink
fix: revert v10 merge
Browse files Browse the repository at this point in the history
  • Loading branch information
davidacevedo committed Feb 17, 2023
1 parent bcb02da commit 3392ce9
Show file tree
Hide file tree
Showing 55 changed files with 164 additions and 226 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Test Coverage

on:
push:
branches: [ master, bootstrap5, v10 ]
branches: [ master, bootstrap5 ]
pull_request:
branches: [ master, bootstrap5, v10 ]
branches: [ master, bootstrap5 ]

jobs:

Expand Down
32 changes: 0 additions & 32 deletions .github/workflows/prerelease.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Node.js CI

on:
push:
branches: [ master, release-*, v10 ]
branches: [ master, release-* ]
pull_request:
branches: [ master, v10 ]
branches: [ master ]

jobs:
build:
Expand Down
6 changes: 3 additions & 3 deletions src/Accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ const defaultProps = {
tag: 'div',
};

const Accordion = React.forwardRef((props, ref) => {
function Accordion(props) {
const {
flush,
open,
toggle,
className,
cssModule,
tag: Tag,
innerRef = ref,
innerRef,
...attributes
} = props;
const classes = mapToCssModules(
Expand All @@ -57,7 +57,7 @@ const Accordion = React.forwardRef((props, ref) => {
<Tag {...attributes} className={classes} ref={innerRef} />
</AccordionContext.Provider>
);
})
}

Accordion.propTypes = propTypes;
Accordion.defaultProps = defaultProps;
Expand Down
6 changes: 3 additions & 3 deletions src/AccordionBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ const defaultProps = {
tag: 'div',
};

const AccordionBody = React.forwardRef((props, ref) => {
function AccordionBody(props) {
const {
className,
cssModule,
tag: Tag,
innerRef = ref,
innerRef,
children,
accordionId,
...attributes
Expand All @@ -57,7 +57,7 @@ const AccordionBody = React.forwardRef((props, ref) => {
<Tag className="accordion-body">{children}</Tag>
</Collapse>
);
})
}

AccordionBody.propTypes = propTypes;
AccordionBody.defaultProps = defaultProps;
Expand Down
6 changes: 3 additions & 3 deletions src/AccordionHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ const defaultProps = {
tag: 'h2',
};

const AccordionHeader = React.forwardRef((props, ref) => {
function AccordionHeader(props) {
const {
className,
cssModule,
tag: Tag,
innerRef = ref,
innerRef,
children,
targetId,
...attributes
Expand Down Expand Up @@ -62,7 +62,7 @@ const AccordionHeader = React.forwardRef((props, ref) => {
</button>
</Tag>
);
})
}

AccordionHeader.propTypes = propTypes;
AccordionHeader.defaultProps = defaultProps;
Expand Down
6 changes: 3 additions & 3 deletions src/AccordionItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ const defaultProps = {
tag: 'div',
};

const AccordionItem = React.forwardRef((props, ref) => {
const { className, cssModule, tag: Tag, innerRef = ref, ...attributes } = props;
function AccordionItem(props) {
const { className, cssModule, tag: Tag, innerRef, ...attributes } = props;
const classes = mapToCssModules(
classNames(className, 'accordion-item'),
cssModule,
);

return <Tag {...attributes} className={classes} ref={innerRef} />;
})
}

AccordionItem.propTypes = propTypes;
AccordionItem.defaultProps = defaultProps;
Expand Down
6 changes: 3 additions & 3 deletions src/Alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const defaultProps = {
},
};

const Alert = React.forwardRef((props, ref) => {
function Alert(props) {
const {
className,
closeClassName,
Expand All @@ -59,7 +59,7 @@ const Alert = React.forwardRef((props, ref) => {
children,
transition,
fade,
innerRef = ref,
innerRef,
...attributes
} = props;

Expand Down Expand Up @@ -103,7 +103,7 @@ const Alert = React.forwardRef((props, ref) => {
{children}
</Fade>
);
});
}

Alert.propTypes = propTypes;
Alert.defaultProps = defaultProps;
Expand Down
6 changes: 3 additions & 3 deletions src/Badge.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ const defaultProps = {
tag: 'span',
};

const Badge = React.forwardRef((props, ref) => {
function Badge(props) {
let {
className,
cssModule,
color,
innerRef = ref,
innerRef,
pill,
tag: Tag,
...attributes
Expand All @@ -55,7 +55,7 @@ const Badge = React.forwardRef((props, ref) => {
}

return <Tag {...attributes} className={classes} ref={innerRef} />;
});
}

Badge.propTypes = propTypes;
Badge.defaultProps = defaultProps;
Expand Down
6 changes: 3 additions & 3 deletions src/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const defaultProps = {
tag: 'button',
};

const Button = React.forwardRef((props, ref) => {
function Button(props) {
const onClick = useCallback(
(e) => {
if (props.disabled) {
Expand All @@ -68,7 +68,7 @@ const Button = React.forwardRef((props, ref) => {
outline,
size,
tag: Tag,
innerRef = ref,
innerRef,
...attributes
} = props;

Expand Down Expand Up @@ -104,7 +104,7 @@ const Button = React.forwardRef((props, ref) => {
aria-label={ariaLabel}
/>
);
});
}

Button.propTypes = propTypes;
Button.defaultProps = defaultProps;
Expand Down
2 changes: 1 addition & 1 deletion src/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ function Card(props) {
Card.propTypes = propTypes;
Card.defaultProps = defaultProps;

export default React.forwardRef((props, ref) => <Card innerRef={ref} {...props} />);
export default Card;
6 changes: 3 additions & 3 deletions src/CardBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ const defaultProps = {
tag: 'div',
};

const CardBody = React.forwardRef((props, ref) => {
const { className, cssModule, innerRef = ref, tag: Tag, ...attributes } = props;
function CardBody(props) {
const { className, cssModule, innerRef, tag: Tag, ...attributes } = props;
const classes = mapToCssModules(
classNames(className, 'card-body'),
cssModule,
);

return <Tag {...attributes} className={classes} ref={innerRef} />;
});
}

CardBody.propTypes = propTypes;
CardBody.defaultProps = defaultProps;
Expand Down
6 changes: 3 additions & 3 deletions src/CardLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ const defaultProps = {
tag: 'a',
};

const CardLink = React.forwardRef((props, ref) => {
const { className, cssModule, tag: Tag, innerRef = ref, ...attributes } = props;
function CardLink(props) {
const { className, cssModule, tag: Tag, innerRef, ...attributes } = props;
const classes = mapToCssModules(
classNames(className, 'card-link'),
cssModule,
);

return <Tag {...attributes} ref={innerRef} className={classes} />;
})
}

CardLink.propTypes = propTypes;
CardLink.defaultProps = defaultProps;
Expand Down
6 changes: 3 additions & 3 deletions src/CloseButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const defaultProps = {
'aria-label': 'close',
};

const CloseButton = React.forwardRef((props, ref) => {
const { className, cssModule, variant, innerRef = ref, ...attributes } = props;
function CloseButton(props) {
const { className, cssModule, variant, innerRef, ...attributes } = props;

const classes = mapToCssModules(
classNames(className, 'btn-close', variant && `btn-close-${variant}`),
Expand All @@ -35,7 +35,7 @@ const CloseButton = React.forwardRef((props, ref) => {
return (
<button ref={innerRef} type="button" className={classes} {...attributes} />
);
});
}

CloseButton.propTypes = propTypes;
CloseButton.defaultProps = defaultProps;
Expand Down
2 changes: 1 addition & 1 deletion src/Collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,4 @@ class Collapse extends Component {

Collapse.propTypes = propTypes;
Collapse.defaultProps = defaultProps;
export default React.forwardRef((props, ref) => <Collapse innerRef={ref} {...props} />);
export default Collapse;
2 changes: 1 addition & 1 deletion src/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,4 +371,4 @@ Dropdown.propTypes = propTypes;
Dropdown.defaultProps = defaultProps;
Dropdown.contextType = InputGroupContext;

export default React.forwardRef((props, ref) => <Dropdown innerRef={ref} {...props} />);
export default Dropdown;
2 changes: 1 addition & 1 deletion src/DropdownToggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@ DropdownToggle.propTypes = propTypes;
DropdownToggle.defaultProps = defaultProps;
DropdownToggle.contextType = DropdownContext;

export default React.forwardRef((props, ref) => <DropdownToggle innerRef={ref} {...props} />);
export default DropdownToggle;
6 changes: 3 additions & 3 deletions src/Fade.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ const defaultProps = {
in: true,
};

const Fade = React.forwardRef((props, ref) => {
function Fade(props) {
const {
tag: Tag,
baseClass,
baseClassActive,
className,
cssModule,
children,
innerRef = ref,
innerRef,
...otherProps
} = props;

Expand All @@ -72,7 +72,7 @@ const Fade = React.forwardRef((props, ref) => {
}}
</Transition>
);
});
}

Fade.propTypes = propTypes;
Fade.defaultProps = defaultProps;
Expand Down
4 changes: 1 addition & 3 deletions src/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ const propTypes = {
const defaultProps = {
tag: 'form',
};

// TODO: Simple conversion of functional component "good-first-task"
class Form extends Component {
constructor(props) {
super(props);
Expand Down Expand Up @@ -56,4 +54,4 @@ class Form extends Component {
Form.propTypes = propTypes;
Form.defaultProps = defaultProps;

export default React.forwardRef((props, ref) => <Form innerRef={ref} {...props} />);
export default Form;
2 changes: 1 addition & 1 deletion src/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,4 @@ class Input extends React.Component {
Input.propTypes = propTypes;
Input.defaultProps = defaultProps;

export default React.forwardRef((props, ref) => <Input innerRef={ref} {...props} />);
export default Input;
2 changes: 1 addition & 1 deletion src/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -574,4 +574,4 @@ Modal.defaultProps = defaultProps;
Modal.openCount = 0;
Modal.originalBodyOverflow = null;

export default React.forwardRef((props, ref) => <Modal innerRef={ref} {...props} />);
export default Modal;
2 changes: 1 addition & 1 deletion src/NavLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ class NavLink extends React.Component {
NavLink.propTypes = propTypes;
NavLink.defaultProps = defaultProps;

export default React.forwardRef((props, ref) => <NavLink innerRef={ref} {...props} />);
export default NavLink;
2 changes: 1 addition & 1 deletion src/Offcanvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,4 +468,4 @@ Offcanvas.propTypes = propTypes;
Offcanvas.defaultProps = defaultProps;
Offcanvas.openCount = 0;

export default React.forwardRef((props, ref) => <Offcanvas innerRef={ref} {...props} />);
export default Offcanvas;

0 comments on commit 3392ce9

Please sign in to comment.