Skip to content

Commit beae33b

Browse files
authored
Merge pull request #148 from z3ombie/issue/147/inline-flag-throws-error
passed value and stringified it in StaticWrapper (fix #147)
2 parents a91a50b + 5b0d100 commit beae33b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/components/StaticWrapper.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ThemeProvider } from 'styled-components';
44
import styles from '../styles';
55
import { Content } from '../elements/Wrapper';
66

7-
const StaticWrapper = ({ theme, position, onChange, displayRule, sync, children, locale }) => {
7+
const StaticWrapper = ({ theme, position, onChange, displayRule, sync, children, locale, value: valueFromProps }) => {
88
const contentRef = useRef();
99
const customTheme = typeof theme === 'object' ? theme : styles(theme);
1010

@@ -31,6 +31,7 @@ const StaticWrapper = ({ theme, position, onChange, displayRule, sync, children,
3131
locale,
3232
position,
3333
ref: contentRef,
34+
value: valueFromProps.toString()
3435
})}
3536
</Content>
3637
</ThemeProvider>
@@ -45,6 +46,7 @@ StaticWrapper.propTypes = {
4546
sync: PropTypes.bool,
4647
onChange: PropTypes.func.isRequired,
4748
displayRule: PropTypes.func.isRequired,
49+
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
4850
};
4951

5052
StaticWrapper.defaultProps = {
@@ -53,6 +55,7 @@ StaticWrapper.defaultProps = {
5355
children: undefined,
5456
sync: false,
5557
locale: 'en',
58+
value: ''
5659
};
5760

5861
export default StaticWrapper;

0 commit comments

Comments
 (0)