playbook_ui 14.3.1.pre.alpha.PBNTR515typeaheadmarginbottomredux3746 → 14.3.1.pre.alpha.PBNTR515typeaheadmarginbottomredux3750
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_textarea/_textarea.tsx +0 -1
- data/app/pb_kits/playbook/pb_textarea/textarea.html.erb +0 -1
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +14 -0
- data/app/pb_kits/playbook/pb_typeahead/components/Control.tsx +17 -24
- data/dist/chunks/{_typeahead-BOTSVWKl.js → _typeahead-B2Nx6LQp.js} +1 -1
- data/dist/chunks/{_weekday_stacked-BRxVcQ3I.js → _weekday_stacked-C3ENHbH6.js} +2 -2
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0061b442112f47a4fb24de619325caf39a5f23ce6e3d5236612617b3b87ed8b0
|
4
|
+
data.tar.gz: 1b77a693e86d40d68b88d7518ee833d3010067c78bd398d96ad0a1fb637046d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7739fe15f06ffbe3c6bfdbf933d0d44ed4d9ad8887a5ae7e76ec83215b09fd8e4edd3870784d47a2fe563fe883f405f7c6c9cbe302d37d0e992f66d4306ddf1c
|
7
|
+
data.tar.gz: a02904df1348f709907111d2bbf39b2e979a9d4690567b2c850f860e0e459c1456342cd2b9187a258b59d30602792c8a68da419fe8dfc3ec46b489517844d028
|
@@ -107,4 +107,18 @@ test('should pass className prop', () => {
|
|
107
107
|
|
108
108
|
const kit = screen.getByTestId('typeahead-test')
|
109
109
|
expect(kit).toHaveClass(className)
|
110
|
+
})
|
111
|
+
|
112
|
+
test('typeahead textinput has mb_sm class by default', () => {
|
113
|
+
render(
|
114
|
+
<Typeahead
|
115
|
+
data={{ testid: 'default-mb-test' }}
|
116
|
+
options={options}
|
117
|
+
/>
|
118
|
+
)
|
119
|
+
|
120
|
+
const kit = screen.getByTestId('default-mb-test')
|
121
|
+
expect(kit).toHaveClass("pb_typeahead_kit mb_sm")
|
122
|
+
const textInput = kit.querySelector(".pb_text_input_kit")
|
123
|
+
expect(textInput).toHaveClass("mb_none")
|
110
124
|
})
|
@@ -3,34 +3,27 @@ import { components } from 'react-select'
|
|
3
3
|
|
4
4
|
import Flex from '../../pb_flex/_flex'
|
5
5
|
import TextInput from '../../pb_text_input/_text_input'
|
6
|
-
import { MarginBottomType } from '../_typeahead'
|
7
|
-
|
8
6
|
|
9
7
|
type Props = {
|
10
8
|
selectProps: any,
|
11
9
|
}
|
12
10
|
|
13
|
-
const TypeaheadControl = (props: Props) =>
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
</Flex>
|
31
|
-
</TextInput>
|
32
|
-
</div>
|
33
|
-
)
|
34
|
-
}
|
11
|
+
const TypeaheadControl = (props: Props) => (
|
12
|
+
<div className="pb_typeahead_wrapper">
|
13
|
+
<TextInput
|
14
|
+
dark={props.selectProps.dark}
|
15
|
+
error={props.selectProps.error}
|
16
|
+
label={props.selectProps.label}
|
17
|
+
marginBottom="none"
|
18
|
+
>
|
19
|
+
<Flex>
|
20
|
+
<components.Control
|
21
|
+
className="text_input"
|
22
|
+
{...props}
|
23
|
+
/>
|
24
|
+
</Flex>
|
25
|
+
</TextInput>
|
26
|
+
</div>
|
27
|
+
)
|
35
28
|
|
36
29
|
export default TypeaheadControl
|