playbook_ui_docs 13.31.0.pre.alpha.PLAY882formpillprimaryandneutral3201 → 13.31.0.pre.alpha.PLAY10863202

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: ebfa493a945249f410d5e192987aaf5b1f131a92caa9260dec29847c522531af
4
- data.tar.gz: 7835e74638db154a6129813f566e9e388b6bca378317065d13184dc535fc376f
3
+ metadata.gz: 7205f191019eeab4d66ece29e57fe8ecb11f7308e040bfd033817b1aec1beef4
4
+ data.tar.gz: 30ba066009c2db180c9627afb83423309ab1f09822647ed78af9c6d3a27ed731
5
5
  SHA512:
6
- metadata.gz: b5b8c85ab7dd4b74c30ee36ee154ff7aa4587c839c938a346575d207030ca3f3af421e76e37789f0a681c6960ba225880b24ae938ea3e2d032ef0d95b8f75034
7
- data.tar.gz: a8d5348f73fca9857ed443e7523332fc4891712b86deeca62b177b3395809429b2250dbc2431b7421627b12710fe73791180db02fc25fa5ef85e8ec4ca442401
6
+ metadata.gz: 63cc90516f0e211059d31e0a4422f3f26cea56049471393840ae12c758e0721fd6f7e9ffd6cee3937220b8b7b25e7f76d19c8b3d7ef2ef076381cead095a00b9
7
+ data.tar.gz: b6e1bc1e318370d91981e983977b2c91afa8c11adeda72b1eea1447beb97524c9b0fe4f9b337928bbc75e8acd4200aaa08bb2534cac1791ee65a71455cdc8737
@@ -5,12 +5,12 @@ import TextInput from '../../pb_text_input/_text_input'
5
5
  import Title from '../../pb_title/_title'
6
6
 
7
7
  const TextInputDefault = (props) => {
8
+ const [firstName, setFirstName] = useState('')
8
9
  const handleOnChangeFirstName = ({ target }) => {
9
10
  setFirstName(target.value)
10
11
  }
11
12
  const ref = React.createRef()
12
13
 
13
- const [firstName, setFirstName] = useState('')
14
14
  const [formFields, setFormFields] = useState({
15
15
  firstName: 'Jane',
16
16
  lastName: 'Doe',
@@ -1,3 +1,5 @@
1
+ /* eslint-disable react/no-multi-comp */
2
+
1
3
  import React, { useState } from 'react'
2
4
 
3
5
  import {
@@ -14,6 +14,12 @@ import {
14
14
  Typeahead,
15
15
  } from '../..'
16
16
 
17
+ type TypeAheadWithHighlightProps = {
18
+ data: {
19
+ name: String,
20
+ },
21
+ };
22
+
17
23
  const USERS = [
18
24
  {
19
25
  name: "Wade Winningham",
@@ -37,7 +43,7 @@ const USERS = [
37
43
  },
38
44
  ];
39
45
 
40
- const TypeaheadWithHighlight = (props) => {
46
+ const TypeaheadWithHighlight = (props: TypeAheadWithHighlightProps) => {
41
47
  const [selectedUser, setSelectedUser] = useState()
42
48
 
43
49
  const formatOptionLabel = ({name, territory, title}, {inputValue}) => {
@@ -47,8 +47,6 @@ const promiseOptions = (inputValue) =>
47
47
 
48
48
  const TypeaheadWithPillsAsync = (props) => {
49
49
  const [users, setUsers] = useState([])
50
- const handleOnChange = (value) => setUsers(formatUsers(value))
51
- const formatValue = (users) => formatUsers(users)
52
50
  const formatUsers = (users) => {
53
51
  const results = () => (users.map((user) => {
54
52
  if (Object.keys(user)[0] === 'name' || Object.keys(user)[1] === 'id'){
@@ -59,6 +57,8 @@ const TypeaheadWithPillsAsync = (props) => {
59
57
  }))
60
58
  return results()
61
59
  }
60
+ const handleOnChange = (value) => setUsers(formatUsers(value))
61
+ const formatValue = (users) => formatUsers(users)
62
62
 
63
63
  return (
64
64
  <>
@@ -48,7 +48,7 @@ const promiseOptions = (inputValue) =>
48
48
 
49
49
  const TypeaheadWithPillsAsyncCustomOptions = (props) => {
50
50
  const [users, setUsers] = useState([])
51
- const handleOnChange = (value) => setUsers(value)
51
+ const handleOnChange = (value) => {setUsers(value)}
52
52
 
53
53
  /**
54
54
  *