Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Commit

Permalink
fix: fix react-jss 10 compatability (#644)
Browse files Browse the repository at this point in the history
  • Loading branch information
robineng committed Sep 30, 2019
1 parent 4412b31 commit cc4a527
Show file tree
Hide file tree
Showing 24 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion documentation/theme/color.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ Color.propTypes = {
classes: PropTypes.object.isRequired,
};

export default injectSheet(styles)(Color);
export default injectSheet(styles, { injectTheme: true })(Color);
2 changes: 1 addition & 1 deletion src/components/alert/alert.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ Alert.defaultProps = {
};

export { Alert as Component, styles };
export default injectSheet(styles)(Alert);
export default injectSheet(styles, { injectTheme: true })(Alert);
2 changes: 1 addition & 1 deletion src/components/avatar/avatar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,4 @@ Avatar.defaultProps = {
};

export { Avatar as Component };
export default injectSheet(styles)(Avatar);
export default injectSheet(styles, { injectTheme: true })(Avatar);
2 changes: 1 addition & 1 deletion src/components/badge/badge.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ Badge.propTypes = {
};

export { Badge as Component };
export default injectSheet(styles)(Badge);
export default injectSheet(styles, { injectTheme: true })(Badge);
2 changes: 1 addition & 1 deletion src/components/button/button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ Button.propTypes = {
};

export { Button as Component, styles };
export default injectSheet(styles)(Button);
export default injectSheet(styles, { injectTheme: true })(Button);
2 changes: 1 addition & 1 deletion src/components/editable-input/editable-input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,5 +232,5 @@ EditableInput.defaultProps = {
sensitivePlaceholder: '****',
};

export default injectSheet(styles)(EditableInput);
export default injectSheet(styles, { injectTheme: true })(EditableInput);
export { EditableInput as Component, styles };
2 changes: 1 addition & 1 deletion src/components/flag/flag-deprecated.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ Flag.propTypes = {
};

export { Flag as Component };
export default injectSheet(styles)(Flag);
export default injectSheet(styles, { injectTheme: true })(Flag);
2 changes: 1 addition & 1 deletion src/components/input/help-text.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ const Component = HelpText;

export { Component, styles };

export default injectSheet(styles)(HelpText);
export default injectSheet(styles, { injectTheme: true })(HelpText);
2 changes: 1 addition & 1 deletion src/components/input/input-checkbox-radio.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,4 @@ InputCheckboxRadio.defaultProps = {
};

export { InputCheckboxRadio as Component, styles };
export default injectSheet(styles)(InputCheckboxRadio);
export default injectSheet(styles, { injectTheme: true })(InputCheckboxRadio);
2 changes: 1 addition & 1 deletion src/components/input/input-default.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,4 @@ InputDefault.defaultProps = {
};

export { InputDefault as Component, styles };
export default injectSheet(styles)(InputDefault);
export default injectSheet(styles, { injectTheme: true })(InputDefault);
2 changes: 1 addition & 1 deletion src/components/input/input-select.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -296,4 +296,4 @@ InputSelect.defaultProps = {
};

export { InputSelect as Component, styles };
export default injectSheet(styles)(InputSelect);
export default injectSheet(styles, { injectTheme: true })(InputSelect);
2 changes: 1 addition & 1 deletion src/components/instrument-badge/instrument-badge.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ InstrumentBadge.defaultProps = {
export { InstrumentBadge as Component };
// prettier-ignore
export default
injectSheet(styles)(
injectSheet(styles, { injectTheme: true })(
deprecatedComponent(
'InstrumentBadge',
'See https://github.com/nordnet/nordnet-ui-kit/blob/v3.0.0/docs/migrations/v3.0.0.md for migration guide.',
Expand Down
2 changes: 1 addition & 1 deletion src/components/labeled-value/labeled-value.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ LabeledValue.propTypes = {
};

export { LabeledValue as Component };
export default injectSheet(styles)(LabeledValue);
export default injectSheet(styles, { injectTheme: true })(LabeledValue);
2 changes: 1 addition & 1 deletion src/components/li/li.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ Li.propTypes = {
};

export { Li as Component };
export default injectSheet(styles)(Li);
export default injectSheet(styles, { injectTheme: true })(Li);
2 changes: 1 addition & 1 deletion src/components/popup-menu/popup-menu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,4 @@ PopupMenu.defaultProps = {
};

export { PopupMenu as Component, styles };
export default injectSheet(styles)(PopupMenu);
export default injectSheet(styles, { injectTheme: true })(PopupMenu);
2 changes: 1 addition & 1 deletion src/components/progress-bar/progress-bar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ ProgressBar.propTypes = {
};

export { ProgressBar as Component, styles };
export default injectSheet(styles)(ProgressBar);
export default injectSheet(styles, { injectTheme: true })(ProgressBar);
2 changes: 1 addition & 1 deletion src/components/spinner/spinner.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@ Spinner.propTypes = {
};

export { Spinner as Component, styles };
export default injectSheet(styles)(Spinner);
export default injectSheet(styles, { injectTheme: true })(Spinner);
2 changes: 1 addition & 1 deletion src/components/subsection/subsection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Subsection.defaultProps = {
children: null,
};

const enhance = injectSheet(styles);
const enhance = injectSheet(styles, { injectTheme: true });

export { Subsection as Component, styles };

Expand Down
2 changes: 1 addition & 1 deletion src/components/table/table-cell/table-cell.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,4 @@ TableCell.propTypes = {
};

export { TableCell as Component, styles };
export default injectSheet(styles)(TableCell);
export default injectSheet(styles, { injectTheme: true })(TableCell);
2 changes: 1 addition & 1 deletion src/components/table/table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ Table.defaultProps = {
maxHeight: null,
};

export default injectSheet(styles)(Table);
export default injectSheet(styles, { injectTheme: true })(Table);
2 changes: 1 addition & 1 deletion src/components/table/tbody/tbody.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ Tbody.propTypes = {
borderLeft: PropTypes.bool,
};

export default injectSheet(styles)(Tbody);
export default injectSheet(styles, { injectTheme: true })(Tbody);
2 changes: 1 addition & 1 deletion src/components/table/tfoot/tfoot.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ Tfoot.propTypes = {
hiddenOnMobile: PropTypes.bool,
};

export default injectSheet(styles)(Tfoot);
export default injectSheet(styles, { injectTheme: true })(Tfoot);
4 changes: 2 additions & 2 deletions src/components/table/thead/thead.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ Thead.propTypes = {
stickyOffset: PropTypes.number,
};

const Normal = injectSheet(styles)(Thead);
const Sticky = injectSheet(stickyOffsetStyles)(Thead);
const Normal = injectSheet(styles, { injectTheme: true })(Thead);
const Sticky = injectSheet(stickyOffsetStyles, { injectTheme: true })(Thead);

const Wrapper = props => (props.stickyOffset ? <Sticky {...props} /> : <Normal {...props} />);

Expand Down
4 changes: 2 additions & 2 deletions src/components/table/tr/tr.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ Tr.propTypes = {
stickyOffset: PropTypes.number,
};

const Normal = injectSheet(styles)(Tr);
const Sticky = injectSheet(stickyOffsetStyles)(Tr);
const Normal = injectSheet(styles, { injectTheme: true })(Tr);
const Sticky = injectSheet(stickyOffsetStyles, { injectTheme: true })(Tr);

const Wrapper = props => (props.stickyOffset ? <Sticky {...props} /> : <Normal {...props} />);

Expand Down

1 comment on commit cc4a527

@vercel
Copy link

@vercel vercel bot commented on cc4a527 Sep 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.