-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSS Styles rework #139
JSS Styles rework #139
Conversation
Examples: // Foo.styles.js
import { createSheet } from '../../theme'
export const styles = createSheet((theme) => ({
foo: {
background: 'transparent',
color: 'white'
}
})) // Foo.js
import { styles } from './Foo.styles'
@styles
export default class Foo extends Component {
render () {
const { classes } = this.props
return <div className={classes.foo}></div>
}
} |
Looking good man, checked it out locally to have a play around 👍 Did you want a hand with the remaining components or happy just knocking them off one by one? |
Note JSS and Jest snapshots might need some work. styled-components/jest-styled-components#29 |
The remainder of this MR is busywork, feels like 20% left to do in terms of time put in. The testing stuff IMO just needs to pass for the components, thus if classNames can be mocked, we will be fine. Snapshotting JSS can come in after those PR's are in, in jest-styled-components. |
jest.config.js
Outdated
@@ -7,8 +7,9 @@ module.exports = { | |||
'node_modules' | |||
], | |||
moduleNameMapper: { | |||
'balloon-css': '<rootDir>/src/__mocks__/styleMock.js', | |||
'\\.(css|scss)$': '<rootDir>/src/__mocks__/styleMock.js', | |||
'balloon-css': 'identity-obj-proxy', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
Intention is to further componentize the project, getting away from CSS dependencies.
Features
Dynamic theming supportDeps
sass-loader
node-sass
balloon-css