Skip to content

Commit 664a823

Browse files
authored
refactor(ui): prop type names & style
1 parent fe33ffe commit 664a823

File tree

129 files changed

+2397
-12582
lines changed

Some content is hidden

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

129 files changed

+2397
-12582
lines changed

src/framework/theme/component/application/application.spec.tsx renamed to src/framework/theme/application/application.spec.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ import {
77
import { ReactTestInstance } from 'react-test-renderer';
88
import {
99
ApplicationProvider,
10-
Props as ApplicationProviderProps,
10+
ApplicationProviderProps,
1111
} from './applicationProvider.component';
12-
import { default as mapping } from '../../common/mapping.json';
13-
import { default as theme } from '../../common/theme.json';
12+
import {
13+
mapping,
14+
theme,
15+
} from '../support/tests';
1416

1517
describe('@app: application wrapper check', () => {
1618

src/framework/theme/component/application/applicationProvider.component.tsx renamed to src/framework/theme/application/applicationProvider.component.tsx

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,44 @@
55
*/
66

77
import React from 'react';
8+
import merge from 'lodash.merge';
89
import { SchemaProcessor } from '@eva/processor-kitten';
910
import {
1011
ThemeStyleType,
1112
SchemaType,
1213
CustomSchemaType,
1314
} from '@eva/core';
14-
import merge from 'lodash.merge';
15-
import { ModalPanel } from '../modal';
16-
import { StyleProvider } from '../style';
17-
import { ThemeProviderProps } from '../theme';
18-
import { ThemeType } from '../../type';
15+
import { StyleProvider } from '../style/styleProvider.component';
16+
import { ThemeProviderProps } from '../theme/themeProvider.component';
17+
import { ModalPanel } from '../modal/modalPanel.component';
18+
import { ThemeType } from '../theme/type';
1919

20-
interface ApplicationProviderProps {
20+
interface ComponentProps {
2121
mapping: SchemaType;
2222
customMapping?: CustomSchemaType;
2323
}
2424

25-
export type Props = ApplicationProviderProps & ThemeProviderProps;
25+
export type ApplicationProviderProps = ComponentProps & ThemeProviderProps;
2626

2727
interface State {
2828
styles: ThemeStyleType;
2929
theme: ThemeType;
3030
}
3131

32-
export class ApplicationProvider extends React.Component<Props, State> {
32+
export class ApplicationProvider extends React.Component<ApplicationProviderProps, State> {
3333

3434
private schemaProcessor: SchemaProcessor = new SchemaProcessor();
3535

36-
constructor(props: Props) {
36+
constructor(props: ApplicationProviderProps) {
3737
super(props);
3838
const { mapping, customMapping, theme } = this.props;
3939

4040
const styles: ThemeStyleType = this.createStyles(mapping, customMapping);
4141

42-
this.state = { styles, theme };
42+
this.state = {
43+
styles,
44+
theme,
45+
};
4346
}
4447

4548
private createStyles = (mapping: SchemaType, custom: CustomSchemaType): ThemeStyleType => {

src/framework/theme/component/application/index.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/framework/theme/component/index.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/framework/theme/component/mapping/index.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/framework/theme/component/modal/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/framework/theme/component/modal/modalPanel.spec.tsx

Lines changed: 0 additions & 164 deletions
This file was deleted.

src/framework/theme/component/modal/modalPanel.spec.tsx.snap

Lines changed: 0 additions & 105 deletions
This file was deleted.

src/framework/theme/component/style/index.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/framework/theme/component/theme/index.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)