Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

Commit

Permalink
fix: tag proptype
Browse files Browse the repository at this point in the history
  • Loading branch information
woile committed Dec 6, 2019
1 parent 7023b5c commit f5c0b44
Show file tree
Hide file tree
Showing 53 changed files with 88 additions and 76 deletions.
2 changes: 1 addition & 1 deletion scripts/new-component
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

Expand Down
2 changes: 1 addition & 1 deletion src/Accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

Expand Down
2 changes: 1 addition & 1 deletion src/AccordionContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

Expand Down
2 changes: 1 addition & 1 deletion src/AccordionItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string,
expanded: PropTypes.bool
};
Expand Down
2 changes: 1 addition & 1 deletion src/AccordionTitle.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

Expand Down
2 changes: 1 addition & 1 deletion src/ActionMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const directions = Object.freeze({
});

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string,
active: PropTypes.bool,
direction: PropTypes.oneOf([directions.LEFT, directions.RIGHT])
Expand Down
2 changes: 1 addition & 1 deletion src/ActionMenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

Expand Down
2 changes: 1 addition & 1 deletion src/ActionMenuLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

Expand Down
2 changes: 1 addition & 1 deletion src/ActionMenuList.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

Expand Down
2 changes: 1 addition & 1 deletion src/ActionMenuTrigger.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

Expand Down
4 changes: 2 additions & 2 deletions src/AppBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

const defaultProps = {
tag: "body"
tag: "div"
};

const AppBody = ({ className, tag: Tag, ...attributes }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/AppLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string,
activeSideBar: PropTypes.bool
};
Expand Down
2 changes: 1 addition & 1 deletion src/Breadcrumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string,
children: PropTypes.node,
"aria-label": PropTypes.string
Expand Down
2 changes: 1 addition & 1 deletion src/BreadcrumbItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

Expand Down
2 changes: 1 addition & 1 deletion src/BreadcrumbLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

Expand Down
2 changes: 1 addition & 1 deletion src/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string,
disabled: PropTypes.bool,
fluid: PropTypes.bool,
Expand Down
2 changes: 1 addition & 1 deletion src/ButtonGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string,
alignRight: PropTypes.bool,
respond: PropTypes.bool,
Expand Down
2 changes: 1 addition & 1 deletion src/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string,
stretch: PropTypes.bool
};
Expand Down
2 changes: 1 addition & 1 deletion src/CardBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

Expand Down
2 changes: 1 addition & 1 deletion src/CardFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

Expand Down
2 changes: 1 addition & 1 deletion src/CardHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

Expand Down
2 changes: 1 addition & 1 deletion src/CardList.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

Expand Down
2 changes: 1 addition & 1 deletion src/CardTitle.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

Expand Down
2 changes: 1 addition & 1 deletion src/Collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Collapse({ children, expanded }) {
...child.props,
collapsed,
expanded: isExpanded,
setExpanded
setexpanded: setExpanded
})
)}
</React.Fragment>
Expand Down
2 changes: 1 addition & 1 deletion src/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string,
fitLayout: PropTypes.bool
};
Expand Down
2 changes: 1 addition & 1 deletion src/Mouseover.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string,
active: PropTypes.bool,
noHover: PropTypes.bool
Expand Down
2 changes: 1 addition & 1 deletion src/MouseoverBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

Expand Down
2 changes: 1 addition & 1 deletion src/Pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

Expand Down
2 changes: 1 addition & 1 deletion src/PaginationLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string,
active: PropTypes.bool,
direction: PropTypes.string
Expand Down
2 changes: 1 addition & 1 deletion src/PaginationPager.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

Expand Down
2 changes: 1 addition & 1 deletion src/PaginationSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

Expand Down
2 changes: 1 addition & 1 deletion src/PaginationSelectField.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

Expand Down
2 changes: 1 addition & 1 deletion src/SideBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string,
fitLayout: PropTypes.bool
};
Expand Down
2 changes: 1 addition & 1 deletion src/SideBarActionMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

Expand Down
2 changes: 1 addition & 1 deletion src/SideBarClose.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

Expand Down
10 changes: 5 additions & 5 deletions src/SideBarLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string,
active: PropTypes.bool,
collapsed: PropTypes.bool,
expanded: PropTypes.bool,
setExpanded: PropTypes.func
setexpanded: PropTypes.func
};

const defaultProps = {
tag: "a",
active: false,
collapsed: false,
expanded: false,
setExpanded: () => {}
setexpanded: () => {}
};

const SideBarLink = ({
Expand All @@ -25,7 +25,7 @@ const SideBarLink = ({
active,
collapsed,
expanded,
setExpanded,
setexpanded,
...attributes
}) => {
const collapsedClass = collapsed
Expand All @@ -41,7 +41,7 @@ const SideBarLink = ({
className
);
const onClick = () => {
setExpanded(!expanded);
setexpanded(!expanded);
};
return <Tag onClick={onClick} {...attributes} className={classes} />;
};
Expand Down
2 changes: 1 addition & 1 deletion src/SideBarMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import classNames from "classnames";

const propTypes = {
tag: PropTypes.node,
tag: PropTypes.elementType,
className: PropTypes.string
};

Expand Down
Loading

0 comments on commit f5c0b44

Please sign in to comment.