Skip to content

Commit fb88e7a

Browse files
authored
Fixed exports (#27)
1 parent 960912a commit fb88e7a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+166
-22697
lines changed

babel.config.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
module.exports = {
22
plugins: [
3-
'@babel/plugin-proposal-class-properties',
4-
['babel-plugin-root-import', {
5-
"rootPathSuffix": "src/",
6-
"rootPathPrefix": "@/"
7-
}]
3+
'@babel/plugin-proposal-class-properties'
84
],
95
presets: [
106
'@babel/typescript',

jest.config.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
{
2-
"setupFilesAfterEnv": ["./setupTests.ts"],
3-
"moduleNameMapper": {
4-
"@/(.*)": "<rootDir>/src/$1"
5-
}
2+
"setupFilesAfterEnv": ["./setupTests.ts"]
63
}

package-lock.json

Lines changed: 12 additions & 22583 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"@types/react-is": "^16.7.1",
2525
"@typescript-eslint/eslint-plugin": "^4.6.1",
2626
"@typescript-eslint/parser": "^4.6.1",
27-
"babel-plugin-root-import": "^6.6.0",
2827
"dart-sass": "^1.25.0",
2928
"enzyme": "^3.11.0",
3029
"enzyme-adapter-react-16": "^1.15.3",

src/components/Button/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import clsx from 'clsx';
33
import PropTypes from 'prop-types';
4-
import { Variant } from '@/components';
4+
import { Variant } from '../utils';
55

66
export type ButtonComponentTypes = 'button' | 'a';
77

__tests__/Button.test.tsx renamed to src/components/Button/__tests__/Button.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { shallow } from 'enzyme';
22
import React from 'react';
3-
import { Button } from '@/components/Button';
4-
import { Variant } from '@/components';
3+
import { Variant } from '../../utils';
4+
import Button from '../Button';
55

66
describe('Button test', () => {
77
it('should render button', () => {

src/components/Button/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export { default as Button } from './Button';
2+
export type { ButtonProps, ButtonComponentTypes } from './Button';

src/components/Card/Card.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import * as React from 'react';
22
import clsx from 'clsx';
33
import PropTypes from 'prop-types';
4-
import CardContent from '@/components/Card/Content';
5-
import { ForwardComponentWithStatics } from '@/components/utils/ForwardComponentWithStatics';
6-
import CardHeader from '@/components/Card/Header';
7-
import { Variant } from '@/components';
4+
import CardContent from './Content';
5+
import { ForwardComponentWithStatics } from '../utils/ForwardComponentWithStatics';
6+
import CardHeader from './Header';
7+
import { Variant } from '../utils';
88

99
export type CardStatics = {
1010
Content: typeof CardContent;

src/components/Card/Content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from 'react';
22
import clsx from 'clsx';
33
import PropTypes from 'prop-types';
44

5-
type CardContentProps = React.HTMLAttributes<HTMLDivElement>;
5+
export type CardContentProps = React.HTMLAttributes<HTMLDivElement>;
66

77
const CardContent = React.forwardRef<HTMLDivElement, CardContentProps>((
88
{

__tests__/Card.test.tsx renamed to src/components/Card/__tests__/Card.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { render } from 'enzyme';
22
import React from 'react';
3-
import Card from '@/components/Card/Card';
4-
import CardContent from '@/components/Card/Content';
5-
import CardHeader from '@/components/Card/Header';
6-
import { Variant } from '@/components';
3+
import { Variant } from '../../utils';
4+
import Card from '../Card';
5+
import CardContent from '../Content';
6+
import CardHeader from '../Header';
77

88
describe('Card test', () => {
99
it('should render card', () => {

0 commit comments

Comments
 (0)