-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pigment-css] Fix propTypes removal during eval stage
Conditional assignment of propTypes was not handled resulting in error while using prod builds of material-ui.
- Loading branch information
1 parent
933b6f4
commit b292796
Showing
8 changed files
with
73 additions
and
3 deletions.
There are no files selected for viewing
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
20 changes: 20 additions & 0 deletions
20
packages/pigment-css-react/tests/styled/fixtures/styled-theme.output.js
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 |
---|---|---|
@@ -1,8 +1,28 @@ | ||
import { styled as _styled, styled as _styled2, styled as _styled3 } from '@pigment-css/react'; | ||
import _theme from '@pigment-css/react/theme'; | ||
import PropTypes from 'prop-types'; | ||
const Component = /*#__PURE__*/ _styled('div')({ | ||
classes: ['c1h7nuob'], | ||
}); | ||
const SliderRail = /*#__PURE__*/ _styled2('span', { | ||
name: 'MuiSlider', | ||
slot: 'Rail', | ||
})({ | ||
classes: ['s13xim6i', 's13xim6i-1'], | ||
}); | ||
const SliderRail2 = /*#__PURE__*/ _styled3('span')({ | ||
classes: ['s1emg10t'], | ||
}); | ||
export function App() { | ||
return ( | ||
<Component> | ||
<SliderRail /> | ||
<SliderRail2 /> | ||
</Component> | ||
); | ||
} | ||
process.env.NODE_ENV !== 'production' | ||
? (App.propTypes = { | ||
children: PropTypes.element, | ||
}) | ||
: void 0; |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.