ywana-core8 0.0.748 → 0.0.749

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.748",
3
+ "version": "0.0.749",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
@@ -120,7 +120,7 @@ export const TextArea = (props) => {
120
120
  export const DropDown = (props) => {
121
121
 
122
122
  const site = useContext(SiteContext)
123
- const { id, options = [], value, onChange, predictive = false, readOnly = false, verbose = true, editable = false, onBlur } = props
123
+ const { id, icon, options = [], value, onChange, predictive = false, readOnly = false, verbose = true, editable = false, onBlur } = props
124
124
  const [open, setOpen] = useState(false)
125
125
  const [label, setLabel] = useState()
126
126
 
@@ -180,7 +180,12 @@ export const DropDown = (props) => {
180
180
  if (canShow) {
181
181
  const filterActive = predictive === true && label && label.length > 0
182
182
  const items = filterActive ? options.filter(option => option.label.toUpperCase().indexOf(label.toUpperCase()) >= 0) : options
183
- const lis = items.map(option => <li key={option.value} value={option.value} onClick={() => select(option.value)}><Text>{option.label}</Text></li>)
183
+ const lis = items.map(option => (
184
+ <li key={option.value} value={option.value} onClick={() => select(option.value)}>
185
+ {icon ? <Icon icon={icon} size="small" /> : ''}
186
+ <Text>{option.label}</Text>
187
+ </li>
188
+ ))
184
189
  return <menu><ul>{lis}</ul></menu>
185
190
  } else {
186
191
  return null