Skip to content

Commit

Permalink
Added styled component plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
fuszenecker-dealogic committed Jul 5, 2018
1 parent edcb65d commit 8564c86
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
1 change: 1 addition & 0 deletions src/components/FullHeightGrid/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import styled from "styled-components";
// tslint:disable-next-line:variable-name
const FullHeightGrid = styled(Grid)`
height: calc(100%);
`;

export default FullHeightGrid;
27 changes: 15 additions & 12 deletions src/components/Login/index.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
import * as React from "react";
import { Button, Card, CardActions, CardText, CardTitle, TextField } from "react-md";
import FullHeightGrid from "../FullHeightGrid";

// tslint:disable-next-line:variable-name
const Login = () => (
<Card>
<CardTitle title="Lorem ipsum" subtitle="dolor sit amet" />
<CardText>
<TextField label="Email" />
<TextField label="Password" type="password" />
</CardText>
<CardActions>
<div>
<Button primary flat swapTheming>Login</Button>
</div>
</CardActions>
</Card>
<FullHeightGrid>
<Card>
<CardTitle title="Lorem ipsum" subtitle="dolor sit amet" />
<CardText>
<TextField label="Email" />
<TextField label="Password" type="password" />
</CardText>
<CardActions>
<div>
<Button primary flat swapTheming>Login</Button>
</div>
</CardActions>
</Card>
</FullHeightGrid>
);

export default Login;
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */

/* Source Map Options */
Expand All @@ -55,5 +55,8 @@
/* Experimental Options */
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
"plugins": [
{ "name": "typescript-styled-plugin" },
]
}
}

0 comments on commit 8564c86

Please sign in to comment.