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(table): remove default export from package #23

Merged
merged 1 commit into from
Jul 13, 2018
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
3,975 changes: 2,411 additions & 1,564 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
"@commitlint/cli": "^7.0.0",
"@indec/react-native-commons": "^0.2.0",
"babel-core": "^6.26.0",
"babel-eslint": "^8.2.5",
"babel-eslint": "^8.2.6",
"babel-plugin-lodash": "^3.3.4",
"babel-preset-react-native": "^4.0.0",
"eslint": "5.0.1",
"eslint": "^5.1.0",
"eslint-config-airbnb": "^17.0.0",
"eslint-plugin-import": "^2.13.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-jsx-a11y": "^6.1.0",
"eslint-plugin-react": "^7.10.0",
"husky": "^0.14.3",
"lodash": "^4.17.4",
"prop-types": "^15.6.2",
"react": "^16.4.1",
"react-native": "^0.55.4",
"react-native": "^0.56.0",
"react-native-elements": "^0.19.0"
},
"peerDependencies": {
Expand Down
9 changes: 5 additions & 4 deletions src/Table/TableCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import {Col} from '@indec/react-native-commons';
import {composeStyles} from '@indec/react-native-commons/util';
import {at, isFunction} from 'lodash';

import columnPropType from '../util/columnPropType';
import datumPropType from '../util/datumPropType';
import columnPropTypes from '../util/columnPropTypes';
import datumPropTypes from '../util/datumPropTypes';

import styles from './styles';

const TableCell = ({datum, column}) => {
Expand All @@ -31,8 +32,8 @@ const TableCell = ({datum, column}) => {
};

TableCell.propTypes = {
datum: datumPropType.isRequired,
column: columnPropType.isRequired
datum: datumPropTypes.isRequired,
column: columnPropTypes.isRequired
};

export default TableCell;
8 changes: 4 additions & 4 deletions src/Table/TableCheckBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import React from 'react';
import {CheckBox} from 'react-native-elements';

import columnPropType from '../util/columnPropType';
import datumPropType from '../util/datumPropType';
import columnPropTypes from '../util/columnPropTypes';
import datumPropTypes from '../util/datumPropTypes';

const TableCheckBox = ({column, datum}) => (
<CheckBox
Expand All @@ -14,8 +14,8 @@ const TableCheckBox = ({column, datum}) => (
);

TableCheckBox.propTypes = {
column: columnPropType.isRequired,
datum: datumPropType.isRequired
column: columnPropTypes.isRequired,
datum: datumPropTypes.isRequired
};

export default TableCheckBox;
5 changes: 3 additions & 2 deletions src/Table/TableHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import {View} from 'react-native';
import {Col, TextStrong} from '@indec/react-native-commons';
import {composeStyles} from '@indec/react-native-commons/util';

import columnPropType from '../util/columnPropType';
import columnPropTypes from '../util/columnPropTypes';

import styles from './styles';

const TableHeader = ({columns}) => (
Expand All @@ -20,7 +21,7 @@ const TableHeader = ({columns}) => (
);

TableHeader.propTypes = {
columns: PropTypes.arrayOf(columnPropType).isRequired
columns: PropTypes.arrayOf(columnPropTypes).isRequired
};

export default TableHeader;
8 changes: 4 additions & 4 deletions src/Table/TableIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {Icon} from 'react-native-elements';
import {getFontAwesome} from '@indec/react-native-commons/util';
import {isFunction} from 'lodash';

import columnPropType from '../util/columnPropType';
import datumPropType from '../util/datumPropType';
import columnPropTypes from '../util/columnPropTypes';
import datumPropTypes from '../util/datumPropTypes';

const TableIcon = ({column, datum}) => (
<Icon
Expand All @@ -20,8 +20,8 @@ const TableIcon = ({column, datum}) => (
);

TableIcon.propTypes = {
column: columnPropType.isRequired,
datum: datumPropType.isRequired
column: columnPropTypes.isRequired,
datum: datumPropTypes.isRequired
};

export default TableIcon;
9 changes: 5 additions & 4 deletions src/Table/TableRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import PropTypes from 'prop-types';
import {Row} from '@indec/react-native-commons';
import {composeStyles, stylePropType} from '@indec/react-native-commons/util';

import columnPropType from '../util/columnPropType';
import columnPropTypes from '../util/columnPropTypes';
import datumPropTypes from '../util/datumPropTypes';

import TableCell from './TableCell';
import datumPropType from '../util/datumPropType';
import styles from './styles';

const hasAccentStyle = (rowIndex, striped) => striped && rowIndex % 2 === 0;
Expand All @@ -27,8 +28,8 @@ const TableRow = ({

TableRow.propTypes = {
rowIndex: PropTypes.number.isRequired,
datum: datumPropType.isRequired,
columns: PropTypes.arrayOf(columnPropType).isRequired,
datum: datumPropTypes.isRequired,
columns: PropTypes.arrayOf(columnPropTypes).isRequired,
striped: PropTypes.bool,
style: stylePropType
};
Expand Down
9 changes: 5 additions & 4 deletions src/Table/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import {ScrollView} from 'react-native';
import {isEmpty} from 'lodash';
import {Col, Row} from '@indec/react-native-commons';

import columnPropType from '../util/columnPropType';
import datumPropType from '../util/datumPropType';
import columnPropTypes from '../util/columnPropTypes';
import datumPropTypes from '../util/datumPropTypes';

import TableRow from './TableRow';
import TableHeader from './TableHeader';

Expand All @@ -23,8 +24,8 @@ const Table = ({data, columns, striped}) => (
);

Table.propTypes = {
data: PropTypes.arrayOf(datumPropType).isRequired,
columns: PropTypes.arrayOf(columnPropType).isRequired,
data: PropTypes.arrayOf(datumPropTypes).isRequired,
columns: PropTypes.arrayOf(columnPropTypes).isRequired,
striped: PropTypes.bool
};

Expand Down
8 changes: 7 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import Table from './Table';
import TableCell from './Table/TableCell';
import TableCheckBox from './Table/TableCheckBox';
import TableHeader from './Table/TableHeader';
import TableIcon from './Table/TableIcon';
import TableRow from './Table/TableRow';

export default Table;
export {Table};
export {TableCell};
export {TableCheckBox};
export {TableHeader};
export {TableIcon};
export {TableRow};
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions src/util/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import columnPropType from './columnPropType';
import datumPropType from './datumPropType';
import columnPropTypes from './columnPropTypes';
import datumPropTypes from './datumPropTypes';

export {columnPropType};
export {datumPropType};
export {columnPropTypes};
export {datumPropTypes};