diff --git a/docs/jss-api.md b/docs/jss-api.md index 56a1e4958..19ab37987 100644 --- a/docs/jss-api.md +++ b/docs/jss-api.md @@ -279,11 +279,11 @@ import jss from 'jss' const styles = { container: { height: 200, - width: data => data.width + width: (data) => data.width }, button: { - color: data => data.button.color, - padding: data => data.button.padding + color: (data) => data.button.color, + padding: (data) => data.button.padding } } @@ -457,7 +457,7 @@ import {getDynamicStyles} from 'jss' const dynamicStyles = getDynamicStyles({ button: { fontSize: 12, - color: data => data.color + color: (data) => data.color } }) diff --git a/packages/jss-plugin-rule-value-function/src/plugin-nested.test.js b/packages/jss-plugin-rule-value-function/src/plugin-nested.test.js index f045ab483..4eb0940bf 100644 --- a/packages/jss-plugin-rule-value-function/src/plugin-nested.test.js +++ b/packages/jss-plugin-rule-value-function/src/plugin-nested.test.js @@ -5,7 +5,7 @@ import {getCss, getStyle, removeWhitespace, resetSheets} from '../../../tests/ut import pluginNested from '../../jss-plugin-nested' import pluginFunction from '.' -const settings = {createGenerateId: () => rule => `${rule.key}-id`} +const settings = {createGenerateId: () => (rule) => `${rule.key}-id`} describe('jss-plugin-rule-value-function: plugin-nested', () => { let jss @@ -21,7 +21,7 @@ describe('jss-plugin-rule-value-function: plugin-nested', () => { sheet = jss .createStyleSheet( { - a: data => ({ + a: (data) => ({ color: data.color, '@media all': { color: 'green' @@ -61,7 +61,7 @@ describe('jss-plugin-rule-value-function: plugin-nested', () => { { a: { color: 'red', - '@media all': data => ({ + '@media all': (data) => ({ color: data.color }) } diff --git a/packages/jss/src/DomRenderer.js b/packages/jss/src/DomRenderer.js index bd07621c1..a8dd0effd 100644 --- a/packages/jss/src/DomRenderer.js +++ b/packages/jss/src/DomRenderer.js @@ -6,7 +6,7 @@ import toCssValue from './utils/toCssValue' /** * Cache the value from the first time a function is called. */ -const memoize = fn => { +const memoize = (fn) => { let value return () => { if (!value) value = fn() diff --git a/packages/react-jss/src/createUseStyles.test.js b/packages/react-jss/src/createUseStyles.test.js index 5bc39b838..b2db928d8 100644 --- a/packages/react-jss/src/createUseStyles.test.js +++ b/packages/react-jss/src/createUseStyles.test.js @@ -27,7 +27,7 @@ describe('React-JSS: createUseStyles', () => { it('should pass theme from props priority', () => { const registry = new SheetsRegistry() - const styles = theme => ({ + const styles = (theme) => ({ button: {color: theme.exampleColor || 'green'} }) @@ -48,7 +48,7 @@ describe('React-JSS: createUseStyles', () => { describe('multiple components that share same hook', () => { const useStyles = createUseStyles({ - item: props => ({ + item: (props) => ({ color: props.active ? 'red' : 'blue', '&:hover': { fontSize: 60 @@ -139,7 +139,7 @@ describe('React-JSS: createUseStyles', () => { const classes = [] - const getClasses = currentClasses => { + const getClasses = (currentClasses) => { classes.push(currentClasses) }