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

Commit

Permalink
fix: group together related components to same folders (#500)
Browse files Browse the repository at this point in the history
Everything table related goes into src/table, etc:

table-cell --> table/table-cell
tbody --> table/tbody
td --> table/td
tfoot --> table/tfoot
th --> table/th
thead --> table/thead
tr --> table/tr

tab --> tabs/tab
tabpanel --> tabs/tabpanel
  • Loading branch information
JacobBlomgren authored Jan 15, 2019
1 parent af26e0c commit 6ab2073
Show file tree
Hide file tree
Showing 34 changed files with 28 additions and 28 deletions.
8 changes: 7 additions & 1 deletion src/components/table/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
export { default } from './table';
export { default as Table } from './table';
export { default as Tbody } from './tbody';
export { default as Td } from './td';
export { default as Tfoot } from './tfoot';
export { default as Th } from './th';
export { default as Thead } from './thead';
export { default as Tr } from './tr';
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import styleUtils from '../table/style-utilities';
import styleUtils from '../style-utilities';

export default theme => {
const { palette, typography, mixins, transitions } = theme;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import styleUtils from '../table/style-utilities';
import styleUtils from '../style-utilities';

export default theme => {
const { palette, mixins } = theme;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import styleUtils from '../table/style-utilities';
import styleUtils from '../style-utilities';

export default ({ mixins, typography, palette: { color } }) => ({
tfoot: {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import styleUtils from '../table/style-utilities';
import styleUtils from '../style-utilities';

const normal = ({ mixins, typography, palette: { color } }) => ({
thead: {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styleUtils from '../table/style-utilities';
import color from '../../styles/color';
import styleUtils from '../style-utilities';
import color from '../../../styles/color';

const normal = theme => {
const { mixins } = theme;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import injectSheet from 'react-jss';
import classNames from 'classnames';
import omit from '../../utilities/omit';
import omit from '../../../utilities/omit';
import styles, { stickyOffset as stickyOffsetStyles } from './tr-styles';

function Tr({ classes, className, children, size, border, sticky, stickyBorder, stickyOffset, ...rest }) {
Expand Down
4 changes: 3 additions & 1 deletion src/components/tabs/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export { default } from './tabs';
export { default as Tabs } from './tabs';
export { default as Tab } from './tab';
export { default as Tabpanel } from './tabpanel';
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 2 additions & 10 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,9 @@ import ShowMore from './components/show-more';
import TableContentWrapper from './components/table-content-wrapper';
import Spinner from './components/spinner';
import Subsection from './components/subsection/subsection';
import Tabs from './components/tabs';
import Tab from './components/tab';
import Tabpanel from './components/tabpanel';
import Table from './components/table';
import Tbody from './components/tbody';
import Td from './components/td';
import Tfoot from './components/tfoot';
import Th from './components/th';
import Thead from './components/thead';
import { Tabs, Tab, Tabpanel } from './components/tabs';
import { Table, Tbody, Td, Tfoot, Th, Thead, Tr } from './components/table';
import Tooltip from './components/tooltip';
import Tr from './components/tr';
import Ul from './components/ul/ul';
import { PopupMenu, PopupMenuItem } from './components/popup-menu';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { mockClasses } from '../../../src';
import { Component as TableContentWrapper, styles } from '../../../src/components/table-content-wrapper/table-content-wrapper';
import TableHead from '../../../src/components/table-content-wrapper/table-head/table-head';
import TableBody from '../../../src/components/table-content-wrapper/table-body/table-body';
import Table from '../../../src/components/table';
import Table from '../../../src/components/table/table';
import Pagination from '../../../src/components/pagination';

const classes = mockClasses(styles);
Expand Down
4 changes: 2 additions & 2 deletions test/components/smart-table-content/table-head.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { expect } from 'chai';
import sinon from 'sinon';
import { shallow } from 'enzyme';
import { mockClasses } from '../../../src';
import Tr from '../../../src/components/tr';
import Th from '../../../src/components/th';
import Tr from '../../../src/components/table/tr';
import Th from '../../../src/components/table/th';
import ArrowDownStraight from '../../../src/components/icon/icons/arrowDownStraight';
import ArrowUpStraight from '../../../src/components/icon/icons/arrowUpStraight';
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import { expect } from 'chai';
import { shallow } from 'enzyme';
import { mockClasses } from '../../../../src';
import { Component as TableCell, styles } from '../../../../src/components/table-cell/table-cell';
import { mockClasses } from '../../../src';
import { Component as TableCell, styles } from '../../../src/components/table/table-cell/table-cell';

describe('<TableCell />', () => {
const classes = mockClasses(styles);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { expect } from 'chai';
import { shallow } from 'enzyme';
import sinon from 'sinon';
import { Component as Tab, styles } from '../../../src/components/tab/tab';
import { Component as Tab, styles } from '../../../src/components/tabs/tab/tab';
import { mockClasses } from '../../../src';

const classes = mockClasses(styles);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { expect } from 'chai';
import { shallow } from 'enzyme';
import { Component as Tabpanel, styles } from '../../../src/components/tabpanel/tabpanel';
import { Component as Tabpanel, styles } from '../../../src/components/tabs/tabpanel/tabpanel';
import { mockClasses } from '../../../src';

const classes = mockClasses(styles);
Expand Down
4 changes: 2 additions & 2 deletions test/components/tabs/tabs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from 'react';
import { expect } from 'chai';
import { shallow } from 'enzyme';
import { Component as Tabs, styles } from '../../../src/components/tabs/tabs';
import Tab from '../../../src/components/tab/tab';
import Tabpanel from '../../../src/components/tabpanel/tabpanel';
import Tab from '../../../src/components/tabs/tab/tab';
import Tabpanel from '../../../src/components/tabs/tabpanel/tabpanel';
import { mockClasses } from '../../../src';

const classes = mockClasses(styles);
Expand Down

0 comments on commit 6ab2073

Please sign in to comment.