This repository has been archived by the owner on Apr 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(scss): Add scss support. Act as css module
Autogenerate types from scss. Convert scss to module css fix #21
- Loading branch information
Showing
9 changed files
with
63 additions
and
9 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.header { | ||
background-color: #ffefc8; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import * as React from 'react'; | ||
|
||
import * as styles from './Header.scss'; | ||
|
||
export interface IHeaderProps { | ||
} | ||
|
||
export interface IHeaderState { | ||
} | ||
|
||
export class Header extends React.Component<IHeaderProps, IHeaderState> { | ||
constructor(props: IHeaderProps) { | ||
super(props); | ||
} | ||
|
||
render() { | ||
return ( | ||
<div className={styles.header}> | ||
<h1>App</h1> | ||
Component name: Header | ||
File name: Header.tsx | ||
</div> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import * as React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import enzymeToJson from 'enzyme-to-json'; | ||
|
||
import { Header } from '../Header'; | ||
|
||
describe('Header.js', () => { | ||
it('renders without crashing', () => { | ||
shallow(<Header/>); | ||
}); | ||
|
||
it('matches snapshot', () => { | ||
const wrapper = shallow(<Header/>); | ||
expect(enzymeToJson(wrapper)).toMatchSnapshot(); | ||
}); | ||
}); |
12 changes: 12 additions & 0 deletions
12
src/client/components/header/tests/__snapshots__/Header.test.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Header.js matches snapshot 1`] = ` | ||
<div | ||
className="header" | ||
> | ||
<h1> | ||
App | ||
</h1> | ||
Component name: Header File name: Header.tsx | ||
</div> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters