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

Create individual files for reactstrap re-exports #288

Merged
merged 3 commits into from
Aug 28, 2017
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/components/AddressInput.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Col, Input, Row } from 'reactstrap';
import flow from 'lodash.flow';
import noop from 'lodash.noop';

import Select from './Select';
import ValidatedFormGroup from './ValidatedFormGroup';
import Col from './Col';
import Input from './Input';
import Row from './Row';

// TODO Dynamic states based on country:
import states from './address/USStates.js';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Alert.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Alert } from 'reactstrap';
import Alert from 'reactstrap/lib/Alert';
import Icon from './Icon';

const ICON_MAP = {
Expand Down
2 changes: 2 additions & 0 deletions src/components/Badge.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Badge from 'reactstrap/lib/Badge';
export default Badge;
12 changes: 5 additions & 7 deletions src/components/BlockPanel.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import PropTypes from 'prop-types';
import React from 'react';
import classnames from 'classnames';
import {
Button,
Card,
CardBlock,
CardHeader,
CardTitle
} from 'reactstrap';
import Button from './Button';
import Card from './Card';
import CardBlock from './CardBlock';
import CardHeader from './CardHeader';
import CardTitle from './CardTitle';
import Icon from './Icon';

class BlockPanel extends React.Component {
Expand Down
2 changes: 1 addition & 1 deletion src/components/BoundForm.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Form } from 'reactstrap';
import Form from './Form';
import noop from 'lodash.noop';

class BoundForm extends React.Component {
Expand Down
2 changes: 2 additions & 0 deletions src/components/Breadcrumb.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Breadcrumb from 'reactstrap/lib/Breadcrumb';
export default Breadcrumb;
2 changes: 2 additions & 0 deletions src/components/BreadcrumbItem.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import BreadcrumbItem from 'reactstrap/lib/BreadcrumbItem';
export default BreadcrumbItem;
2 changes: 2 additions & 0 deletions src/components/Button.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Button from 'reactstrap/lib/Button';
export default Button;
2 changes: 2 additions & 0 deletions src/components/ButtonDropdown.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import ButtonDropdown from 'reactstrap/lib/ButtonDropdown';
export default ButtonDropdown;
2 changes: 2 additions & 0 deletions src/components/ButtonGroup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import ButtonGroup from 'reactstrap/lib/ButtonGroup';
export default ButtonGroup;
2 changes: 2 additions & 0 deletions src/components/ButtonToolbar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import ButtonToolbar from 'reactstrap/lib/ButtonToolbar';
export default ButtonToolbar;
2 changes: 1 addition & 1 deletion src/components/Calendar.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Table } from 'reactstrap';
import classnames from 'classnames';
import addWeeks from 'date-fns/add_weeks';
import eachDay from 'date-fns/each_day';
Expand All @@ -15,6 +14,7 @@ import startOfDay from 'date-fns/start_of_day';
import startOfMonth from 'date-fns/start_of_month';
import startOfWeek from 'date-fns/start_of_week';
import style from './Calendar.scss';
import Table from './Table';

// TODO locale/localize

Expand Down
2 changes: 2 additions & 0 deletions src/components/Card.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Card from 'reactstrap/lib/Card';
export default Card;
2 changes: 2 additions & 0 deletions src/components/CardBlock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import CardBlock from 'reactstrap/lib/CardBlock';
export default CardBlock;
2 changes: 2 additions & 0 deletions src/components/CardColumns.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import CardColumns from 'reactstrap/lib/CardColumns';
export default CardColumns;
2 changes: 2 additions & 0 deletions src/components/CardDeck.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import CardDeck from 'reactstrap/lib/CardDeck';
export default CardDeck;
2 changes: 2 additions & 0 deletions src/components/CardFooter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import CardFooter from 'reactstrap/lib/CardFooter';
export default CardFooter;
2 changes: 2 additions & 0 deletions src/components/CardGroup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import CardGroup from 'reactstrap/lib/CardGroup';
export default CardGroup;
2 changes: 2 additions & 0 deletions src/components/CardHeader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import CardHeader from 'reactstrap/lib/CardHeader';
export default CardHeader;
2 changes: 2 additions & 0 deletions src/components/CardImg.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import CardImg from 'reactstrap/lib/CardImg';
export default CardImg;
2 changes: 2 additions & 0 deletions src/components/CardImgOverlay.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import CardImgOverlay from 'reactstrap/lib/CardImgOverlay';
export default CardImgOverlay;
2 changes: 2 additions & 0 deletions src/components/CardLink.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import CardLink from 'reactstrap/lib/CardLink';
export default CardLink;
2 changes: 2 additions & 0 deletions src/components/CardSubtitle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import CardSubtitle from 'reactstrap/lib/CardSubtitle';
export default CardSubtitle;
2 changes: 2 additions & 0 deletions src/components/CardText.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import CardText from 'reactstrap/lib/CardText';
export default CardText;
2 changes: 2 additions & 0 deletions src/components/CardTitle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import CardTitle from 'reactstrap/lib/CardTitle';
export default CardTitle;
4 changes: 3 additions & 1 deletion src/components/CheckboxBooleanInput.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import PropTypes from 'prop-types';
import React from 'react';
import { FormGroup, Input, Label } from 'reactstrap';
import FormGroup from './FormGroup';
import Input from './Input';
import Label from './Label';

class CheckboxBooleanInput extends React.Component {
static propTypes = {
Expand Down
2 changes: 2 additions & 0 deletions src/components/Col.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Col from 'reactstrap/lib/Col';
export default Col;
2 changes: 2 additions & 0 deletions src/components/Container.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Container from 'reactstrap/lib/Container';
export default Container;
3 changes: 2 additions & 1 deletion src/components/CreditCardExpiration.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Col, Row } from 'reactstrap';
import Col from './Col';
import Row from './Row';
import Select from './Select';

const today = new Date();
Expand Down
6 changes: 2 additions & 4 deletions src/components/CreditCardInput.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import {
Row,
Col
} from 'reactstrap';
import Col from './Col';
import Row from './Row';
import PatternInput from './PatternInput';
import ValidatedFormGroup from './ValidatedFormGroup';
import CreditCardExpiration from './CreditCardExpiration';
Expand Down
4 changes: 3 additions & 1 deletion src/components/CreditCardNumber.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Input, InputGroup, InputGroupAddon } from 'reactstrap';
import CardValidator from 'card-validator';
import cardTypeInfo from 'credit-card-type';
import Icon from './Icon';
import Input from './Input';
import InputGroup from './InputGroup';
import InputGroupAddon from './InputGroupAddon';

const { number } = CardValidator;

Expand Down
3 changes: 2 additions & 1 deletion src/components/CurrencyInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import MaskedInput from 'react-text-mask';
//import createNumberMask from 'text-mask-addons/dist/createNumberMask';
import createNumberMask from './CurrencyInput/createNumberMaskMonkeyPatch';

import { InputGroup, InputGroupAddon } from 'reactstrap';
import InputGroup from './InputGroup';
import InputGroupAddon from './InputGroupAddon';

/**
* In the case where the user enters an extra "." at the end of the input the default behavior will
Expand Down
3 changes: 2 additions & 1 deletion src/components/Datapair.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Col, Row } from 'reactstrap';
import Col from './Col';
import Row from './Row';

const Datapair = props => (
<Row className="mb-1">
Expand Down
18 changes: 8 additions & 10 deletions src/components/DateInput.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
import PropTypes from 'prop-types';
import React from 'react';
import {
Button,
ButtonGroup,
Dropdown,
DropdownMenu,
Input,
InputGroupButton,
InputGroup
} from 'reactstrap';
import addDays from 'date-fns/add_days';
import addMonths from 'date-fns/add_months';
import addWeeks from 'date-fns/add_weeks';
Expand All @@ -17,7 +8,14 @@ import isValid from 'date-fns/is_valid';
import Fecha from 'fecha'; // TODO replace with date-fns/parse after v2 is released
import format from 'date-fns/format';
import Icon from './Icon';
import Calendar from './Calendar.js';
import Button from './Button';
import ButtonGroup from './ButtonGroup';
import Calendar from './Calendar';
import Dropdown from './Dropdown';
import DropdownMenu from './DropdownMenu';
import Input from './Input';
import InputGroupButton from './InputGroupButton';
import InputGroup from './InputGroup';

const { parse } = Fecha;

Expand Down
2 changes: 2 additions & 0 deletions src/components/Dropdown.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Dropdown from 'reactstrap/lib/Dropdown';
export default Dropdown;
2 changes: 2 additions & 0 deletions src/components/DropdownItem.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import DropdownItem from 'reactstrap/lib/DropdownItem';
export default DropdownItem;
2 changes: 2 additions & 0 deletions src/components/DropdownMenu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import DropdownMenu from 'reactstrap/lib/DropdownMenu';
export default DropdownMenu;
2 changes: 2 additions & 0 deletions src/components/DropdownToggle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import DropdownToggle from 'reactstrap/lib/DropdownToggle';
export default DropdownToggle;
6 changes: 5 additions & 1 deletion src/components/EditableNote.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Button, ButtonToolbar, Card, CardBlock, Input } from 'reactstrap';
import Button from './Button';
import ButtonToolbar from './ButtonToolbar';
import Card from './Card';
import CardBlock from './CardBlock';
import Input from './Input';

class EditableNote extends React.Component {
static propTypes = {
Expand Down
2 changes: 2 additions & 0 deletions src/components/Fade.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Fade from 'reactstrap/lib/Fade';
export default Fade;
2 changes: 1 addition & 1 deletion src/components/FeatureBanner.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Alert } from 'reactstrap';
import Alert from 'reactstrap/lib/Alert';
import styles from './FeatureBanner.scss';

export default class FeatureBanner extends React.Component {
Expand Down
2 changes: 1 addition & 1 deletion src/components/FileInput.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Input } from 'reactstrap';
import Input from './Input';

class FileInput extends React.Component {
onChange = changeEvent => {
Expand Down
2 changes: 2 additions & 0 deletions src/components/Form.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Form from 'reactstrap/lib/Form';
export default Form;
4 changes: 3 additions & 1 deletion src/components/FormChoice.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React from 'react';
import classname from 'classnames';
import { FormGroup, Input, Label } from 'reactstrap';
import FormGroup from './FormGroup';
import Input from './Input';
import Label from './Label';

const FormChoice = props => {
const {
Expand Down
2 changes: 2 additions & 0 deletions src/components/FormFeedback.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import FormFeedback from 'reactstrap/lib/FormFeedback';
export default FormFeedback;
2 changes: 2 additions & 0 deletions src/components/FormGroup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import FormGroup from 'reactstrap/lib/FormGroup';
export default FormGroup;
11 changes: 8 additions & 3 deletions src/components/FormRow.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import PropTypes from 'prop-types';
import React from 'react';
import { FormGroup, Input, Label, Col, Row, FormFeedback, FormText } from 'reactstrap';

import CheckboxInput from './CheckboxInput';
import Col from './Col';
import FileInput from './FileInput';
import FormFeedback from './FormFeedback';
import FormGroup from './FormGroup';
import FormText from './FormText';
import Input from './Input';
import Label from './Label';
import RadioInput from './RadioInput';
import Row from './Row';
import StaticInput from './StaticInput';
import FileInput from './FileInput';

const typeTranslations = {
checkbox: CheckboxInput,
Expand Down
2 changes: 2 additions & 0 deletions src/components/FormText.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import FormText from 'reactstrap/lib/FormText';
export default FormText;
2 changes: 1 addition & 1 deletion src/components/HasManyFieldsAdd.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import classNames from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import { Button } from 'reactstrap';
import Button from './Button';

import Icon from './Icon';

Expand Down
6 changes: 4 additions & 2 deletions src/components/HasManyFieldsRow.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import noop from 'lodash.noop';
import PropTypes from 'prop-types';
import React from 'react';
import { Button, Col, Row } from 'reactstrap';

import Button from './Button';
import Col from './Col';
import Icon from './Icon';
import Row from './Row';


const HasManyFieldsRow = ({ children, onDelete, disabled }) => (
<Row className="mb-3" noGutters>
Expand Down
4 changes: 3 additions & 1 deletion src/components/HelpBubble.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import PropTypes from 'prop-types';
import React from 'react';
import Icon from './Icon';
import { Popover, PopoverTitle, PopoverContent } from 'reactstrap';
import Popover from './Popover';
import PopoverTitle from './PopoverTitle';
import PopoverContent from './PopoverContent';

let count = 0;

Expand Down
2 changes: 2 additions & 0 deletions src/components/Input.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Input from 'reactstrap/lib/Input';
export default Input;
2 changes: 2 additions & 0 deletions src/components/InputGroup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import InputGroup from 'reactstrap/lib/InputGroup';
export default InputGroup;
2 changes: 2 additions & 0 deletions src/components/InputGroupAddon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import InputGroupAddon from 'reactstrap/lib/InputGroupAddon';
export default InputGroupAddon;
2 changes: 2 additions & 0 deletions src/components/InputGroupButton.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import InputGroupButton from 'reactstrap/lib/InputGroupButton';
export default InputGroupButton;
2 changes: 2 additions & 0 deletions src/components/Jumbotron.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Jumbotron from 'reactstrap/lib/Jumbotron';
export default Jumbotron;
2 changes: 2 additions & 0 deletions src/components/Label.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Label from 'reactstrap/lib/Label';
export default Label;
2 changes: 2 additions & 0 deletions src/components/ListGroup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import ListGroup from 'reactstrap/lib/ListGroup';
export default ListGroup;
2 changes: 2 additions & 0 deletions src/components/Media.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Media from 'reactstrap/lib/Media';
export default Media;
2 changes: 1 addition & 1 deletion src/components/Modal.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Modal } from 'reactstrap';
import Modal from 'reactstrap/lib/Modal';

Modal.defaultProps = {
...Modal.defaultProps,
Expand Down
2 changes: 2 additions & 0 deletions src/components/ModalBody.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import ModalBody from 'reactstrap/lib/ModalBody';
export default ModalBody;
2 changes: 2 additions & 0 deletions src/components/ModalFooter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import ModalFooter from 'reactstrap/lib/ModalFooter';
export default ModalFooter;
2 changes: 2 additions & 0 deletions src/components/ModalHeader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import ModalHeader from 'reactstrap/lib/ModalHeader';
export default ModalHeader;
2 changes: 2 additions & 0 deletions src/components/Nav.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Nav from 'reactstrap/lib/Nav';
export default Nav;
2 changes: 2 additions & 0 deletions src/components/NavDropdown.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import NavDropdown from 'reactstrap/lib/NavDropdown';
export default NavDropdown;
2 changes: 2 additions & 0 deletions src/components/NavItem.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import NavItem from 'reactstrap/lib/NavItem';
export default NavItem;
2 changes: 2 additions & 0 deletions src/components/NavLink.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import NavLink from 'reactstrap/lib/NavLink';
export default NavLink;
2 changes: 2 additions & 0 deletions src/components/Navbar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Navbar from 'reactstrap/lib/Navbar';
export default Navbar;
Loading