Commit 18ea367 1 parent d04d426 commit 18ea367 Copy full SHA for 18ea367
File tree 2 files changed +12
-2
lines changed
src/components/inputs/password-input
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ const PasswordInput = props => (
18
18
disabled = { props . isDisabled }
19
19
placeholder = { props . placeholder }
20
20
autoComplete = { props . autoComplete }
21
- css = { getInputStyles ( props ) }
21
+ css = { theme => getInputStyles ( props , theme ) }
22
22
readOnly = { props . isReadOnly }
23
23
autoFocus = { props . isAutofocussed }
24
24
{ ...filterDataAttributes ( props ) }
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
+ import { ThemeProvider } from 'emotion-theming' ;
2
3
import { PasswordInput } from 'ui-kit' ;
3
4
import { Suite , Spec } from '../../../../test/percy' ;
4
5
5
6
const value = 'hello world how are you?' ;
6
7
7
8
export const routePath = '/password-input' ;
8
9
9
- export const component = ( ) => (
10
+ export const component = ( { themes } ) => (
10
11
< Suite >
11
12
< Spec label = "minimal" >
12
13
< PasswordInput
@@ -73,5 +74,14 @@ export const component = () => (
73
74
hasWarning = { true }
74
75
/>
75
76
</ Spec >
77
+ < ThemeProvider theme = { themes . darkTheme } >
78
+ < Spec label = "with custom (inverted) theme" >
79
+ < PasswordInput
80
+ value = { value }
81
+ onChange = { ( ) => { } }
82
+ horizontalConstraint = "m"
83
+ />
84
+ </ Spec >
85
+ </ ThemeProvider >
76
86
</ Suite >
77
87
) ;
You can’t perform that action at this time.
0 commit comments