diff options
Diffstat (limited to 'packages/forms')
-rw-r--r-- | packages/forms/package.json | 6 | ||||
-rw-r--r-- | packages/forms/src/button/index.tsx | 1 | ||||
-rw-r--r-- | packages/forms/src/input/index.tsx | 9 | ||||
-rw-r--r-- | packages/forms/src/label/index.tsx | 2 |
4 files changed, 13 insertions, 5 deletions
diff --git a/packages/forms/package.json b/packages/forms/package.json index e78929777..fe161a282 100644 --- a/packages/forms/package.json +++ b/packages/forms/package.json | |||
@@ -1,6 +1,6 @@ | |||
1 | { | 1 | { |
2 | "name": "@meetfranz/forms", | 2 | "name": "@meetfranz/forms", |
3 | "version": "1.0.9", | 3 | "version": "1.0.13", |
4 | "description": "React form components for Franz", | 4 | "description": "React form components for Franz", |
5 | "main": "lib/index.js", | 5 | "main": "lib/index.js", |
6 | "scripts": { | 6 | "scripts": { |
@@ -25,7 +25,7 @@ | |||
25 | "dependencies": { | 25 | "dependencies": { |
26 | "@mdi/js": "^3.3.92", | 26 | "@mdi/js": "^3.3.92", |
27 | "@mdi/react": "^1.1.0", | 27 | "@mdi/react": "^1.1.0", |
28 | "@meetfranz/theme": "^1.0.7", | 28 | "@meetfranz/theme": "^1.0.11", |
29 | "react-html-attributes": "^1.4.3", | 29 | "react-html-attributes": "^1.4.3", |
30 | "react-loader": "^2.4.5" | 30 | "react-loader": "^2.4.5" |
31 | }, | 31 | }, |
@@ -35,5 +35,5 @@ | |||
35 | "react-dom": "16.7.0", | 35 | "react-dom": "16.7.0", |
36 | "react-jss": "^8.6.1" | 36 | "react-jss": "^8.6.1" |
37 | }, | 37 | }, |
38 | "gitHead": "14b151cad6a5a849bb476aaa3fc53bf1eead7f4b" | 38 | "gitHead": "27778954921365e4957eae964e28f68690f3825f" |
39 | } | 39 | } |
diff --git a/packages/forms/src/button/index.tsx b/packages/forms/src/button/index.tsx index 7a7f83dab..6959cde73 100644 --- a/packages/forms/src/button/index.tsx +++ b/packages/forms/src/button/index.tsx | |||
@@ -44,6 +44,7 @@ const styles = (theme: Theme) => ({ | |||
44 | width: (props: IProps) => (props.stretch ? '100%' : 'auto') as CSS.WidthProperty<string>, | 44 | width: (props: IProps) => (props.stretch ? '100%' : 'auto') as CSS.WidthProperty<string>, |
45 | fontSize: theme.uiFontSize, | 45 | fontSize: theme.uiFontSize, |
46 | textDecoration: 'none', | 46 | textDecoration: 'none', |
47 | height: theme.buttonHeight, | ||
47 | 48 | ||
48 | '&:hover': { | 49 | '&:hover': { |
49 | opacity: 0.8, | 50 | opacity: 0.8, |
diff --git a/packages/forms/src/input/index.tsx b/packages/forms/src/input/index.tsx index cc3709b1a..f89c91be5 100644 --- a/packages/forms/src/input/index.tsx +++ b/packages/forms/src/input/index.tsx | |||
@@ -34,7 +34,7 @@ interface IState { | |||
34 | } | 34 | } |
35 | 35 | ||
36 | class InputComponent extends Component<IProps, IState> { | 36 | class InputComponent extends Component<IProps, IState> { |
37 | public static defaultProps = { | 37 | static defaultProps = { |
38 | focus: false, | 38 | focus: false, |
39 | onChange: () => {}, | 39 | onChange: () => {}, |
40 | onBlur: () => {}, | 40 | onBlur: () => {}, |
@@ -109,8 +109,10 @@ class InputComponent extends Component<IProps, IState> { | |||
109 | placeholder, | 109 | placeholder, |
110 | spellCheck, | 110 | spellCheck, |
111 | onBlur, | 111 | onBlur, |
112 | onEnterKey, | ||
113 | onFocus, | 112 | onFocus, |
113 | min, | ||
114 | max, | ||
115 | step, | ||
114 | } = this.props; | 116 | } = this.props; |
115 | 117 | ||
116 | const { | 118 | const { |
@@ -157,6 +159,9 @@ class InputComponent extends Component<IProps, IState> { | |||
157 | onBlur={onBlur} | 159 | onBlur={onBlur} |
158 | disabled={disabled} | 160 | disabled={disabled} |
159 | onKeyPress={this.onInputKeyPress.bind(this)} | 161 | onKeyPress={this.onInputKeyPress.bind(this)} |
162 | min={min} | ||
163 | max={max} | ||
164 | step={step} | ||
160 | /> | 165 | /> |
161 | {suffix && ( | 166 | {suffix && ( |
162 | <span className={classes.suffix}> | 167 | <span className={classes.suffix}> |
diff --git a/packages/forms/src/label/index.tsx b/packages/forms/src/label/index.tsx index 36fcfbedf..590270a06 100644 --- a/packages/forms/src/label/index.tsx +++ b/packages/forms/src/label/index.tsx | |||
@@ -26,6 +26,8 @@ class LabelComponent extends Component<ILabel> { | |||
26 | htmlFor, | 26 | htmlFor, |
27 | } = this.props; | 27 | } = this.props; |
28 | 28 | ||
29 | if (!showLabel) return children; | ||
30 | |||
29 | return ( | 31 | return ( |
30 | <label | 32 | <label |
31 | className={classnames({ | 33 | className={classnames({ |