playbook_ui 14.3.1.pre.alpha.PBNTR515typeaheadmarginbottomredux3746 → 14.3.1.pre.alpha.PBNTR515typeaheadmarginbottomredux3750

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f422119e094bb65421697ac44567037f7dc9f7c1a6fa490b696245accea173d2
4
- data.tar.gz: a9513ac152f0b28da77fcd545c9c288b1935d46c90f2c7e777b85a8edd57a2c5
3
+ metadata.gz: 0061b442112f47a4fb24de619325caf39a5f23ce6e3d5236612617b3b87ed8b0
4
+ data.tar.gz: 1b77a693e86d40d68b88d7518ee833d3010067c78bd398d96ad0a1fb637046d5
5
5
  SHA512:
6
- metadata.gz: c717f2203155c2e7acfee431ba79a78e6e6f392a3bc4fe57b50063067ad217fb95304818a563aa1009dc6369f95952dcbee28ca6746aeee8f5af1d891d85a873
7
- data.tar.gz: a23cf73a0bbcd1cf5482469fc3786f1c857bceb090ab7f5e1fed709ff022ad95246b34be5be65d0696e55cb8c971ec4f145c9e17f94ed7855861f348c7cf05c2
6
+ metadata.gz: 7739fe15f06ffbe3c6bfdbf933d0d44ed4d9ad8887a5ae7e76ec83215b09fd8e4edd3870784d47a2fe563fe883f405f7c6c9cbe302d37d0e992f66d4306ddf1c
7
+ data.tar.gz: a02904df1348f709907111d2bbf39b2e979a9d4690567b2c850f860e0e459c1456342cd2b9187a258b59d30602792c8a68da419fe8dfc3ec46b489517844d028
@@ -92,7 +92,6 @@ const Textarea = ({
92
92
  <Caption text={label} />
93
93
  {children || (
94
94
  <textarea
95
- className="pb_textarea_kit"
96
95
  disabled={disabled}
97
96
  name={name}
98
97
  onChange={onChange}
@@ -15,7 +15,6 @@
15
15
  <%= text_area(
16
16
  :object,
17
17
  :method,
18
- :class => "#{object.classname}",
19
18
  :max_characters => object.max_characters,
20
19
  :name => object.name,
21
20
  :onkeyup => object.onkeyup,
@@ -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
- const { selectProps } = props
15
- const { dark, error, label } = selectProps
16
-
17
- return (
18
- <div className="pb_typeahead_wrapper">
19
- <TextInput
20
- dark={dark}
21
- error={error}
22
- label={label}
23
- marginBottom="none"
24
- >
25
- <Flex>
26
- <components.Control
27
- className="text_input"
28
- {...props}
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