Skip to content
This repository has been archived by the owner on Sep 23, 2023. It is now read-only.

Commit

Permalink
Add SKIP_PREFLIGHT_CHECK as env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Silind committed Mar 28, 2020
1 parent 6863053 commit 3522ddc
Show file tree
Hide file tree
Showing 10 changed files with 352 additions and 21 deletions.
6 changes: 5 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,15 @@
"no-underscore-dangle": "off",
"global-require": "off",
"arrow-body-style": "off",
"implicit-arrow-linebreak": "off",
"object-curly-newline": "off",
"lines-between-class-members": "off",
"function-paren-newline": "off",
"linebreak-style": "off",
"operator-linebreak": "off",
"jsx-quotes": "off",
"no-prototype-builtins": "off",
"consistent-return": "off",
"max-len": ["warn",{ "code": 120 }]
"max-len": ["warn", { "code": 120 }]
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "direflow-cli",
"version": "3.4.7",
"version": "3.4.8",
"description": "Official CLI for Direflow",
"main": "dist/index.js",
"scripts": {
Expand Down Expand Up @@ -106,4 +106,4 @@
],
"collectCoverage": true
}
}
}
4 changes: 1 addition & 3 deletions packages/direflow-component/declarations.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
declare module 'style-it';

declare module 'react-shadow';
declare module 'react-lib-adler32';

declare module '*.css' {
const classes: { readonly [key: string]: string };
Expand Down
7 changes: 3 additions & 4 deletions packages/direflow-component/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "direflow-component",
"version": "3.4.7",
"version": "3.4.8",
"description": "Create Web Components using React",
"main": "dist/index.js",
"author": "Silind Software",
Expand All @@ -20,8 +20,7 @@
"chalk": "2.4.2",
"lodash.clonedeep": "4.5.0",
"node-sass": "4.13.0",
"react": "16.13.1",
"style-it": "2.1.4",
"react-lib-adler32": "^1.0.3",
"webfontloader": "1.6.28"
},
"devDependencies": {
Expand All @@ -35,4 +34,4 @@
"react": "16.13.1",
"react-dom": "16.13.1"
}
}
}
10 changes: 8 additions & 2 deletions packages/direflow-component/src/components/Styled.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import React, { FC, Component, ReactNode, ComponentClass, CSSProperties } from 'react';
import Style from 'style-it';
import Style from '../helpers/styleInjector';

type TStyles = string | string[] | CSSProperties | CSSProperties[];

interface IStyled {
styles: TStyles;
scoped?: boolean;
children: ReactNode | ReactNode[];
}

Expand All @@ -19,7 +20,12 @@ const Styled: FC<IStyled> = (props): JSX.Element => {
);
}

return Style.it(styles, props.children);
return (
<Style scoped={props.scoped}>
{styles}
{props.children}
</Style>
);
};

const withStyles = (styles: TStyles) => <P, S>(WrappedComponent: ComponentClass<P, S> | FC<P>) => {
Expand Down
Loading

0 comments on commit 3522ddc

Please sign in to comment.