Skip to content

Commit

Permalink
refactor(ui): prop type names & style
Browse files Browse the repository at this point in the history
  • Loading branch information
artyorsh authored May 13, 2019
1 parent fe33ffe commit 664a823
Show file tree
Hide file tree
Showing 129 changed files with 2,397 additions and 12,582 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ import {
import { ReactTestInstance } from 'react-test-renderer';
import {
ApplicationProvider,
Props as ApplicationProviderProps,
ApplicationProviderProps,
} from './applicationProvider.component';
import { default as mapping } from '../../common/mapping.json';
import { default as theme } from '../../common/theme.json';
import {
mapping,
theme,
} from '../support/tests';

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,44 @@
*/

import React from 'react';
import merge from 'lodash.merge';
import { SchemaProcessor } from '@eva/processor-kitten';
import {
ThemeStyleType,
SchemaType,
CustomSchemaType,
} from '@eva/core';
import merge from 'lodash.merge';
import { ModalPanel } from '../modal';
import { StyleProvider } from '../style';
import { ThemeProviderProps } from '../theme';
import { ThemeType } from '../../type';
import { StyleProvider } from '../style/styleProvider.component';
import { ThemeProviderProps } from '../theme/themeProvider.component';
import { ModalPanel } from '../modal/modalPanel.component';
import { ThemeType } from '../theme/type';

interface ApplicationProviderProps {
interface ComponentProps {
mapping: SchemaType;
customMapping?: CustomSchemaType;
}

export type Props = ApplicationProviderProps & ThemeProviderProps;
export type ApplicationProviderProps = ComponentProps & ThemeProviderProps;

interface State {
styles: ThemeStyleType;
theme: ThemeType;
}

export class ApplicationProvider extends React.Component<Props, State> {
export class ApplicationProvider extends React.Component<ApplicationProviderProps, State> {

private schemaProcessor: SchemaProcessor = new SchemaProcessor();

constructor(props: Props) {
constructor(props: ApplicationProviderProps) {
super(props);
const { mapping, customMapping, theme } = this.props;

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

this.state = { styles, theme };
this.state = {
styles,
theme,
};
}

private createStyles = (mapping: SchemaType, custom: CustomSchemaType): ThemeStyleType => {
Expand Down
4 changes: 0 additions & 4 deletions src/framework/theme/component/application/index.ts

This file was deleted.

5 changes: 0 additions & 5 deletions src/framework/theme/component/index.ts

This file was deleted.

5 changes: 0 additions & 5 deletions src/framework/theme/component/mapping/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/framework/theme/component/modal/index.ts

This file was deleted.

164 changes: 0 additions & 164 deletions src/framework/theme/component/modal/modalPanel.spec.tsx

This file was deleted.

105 changes: 0 additions & 105 deletions src/framework/theme/component/modal/modalPanel.spec.tsx.snap

This file was deleted.

10 changes: 0 additions & 10 deletions src/framework/theme/component/style/index.ts

This file was deleted.

9 changes: 0 additions & 9 deletions src/framework/theme/component/theme/index.ts

This file was deleted.

Loading

0 comments on commit 664a823

Please sign in to comment.