ywana-core8 0.0.67 → 0.0.68

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.67",
3
+ "version": "0.0.68",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
@@ -376,7 +376,6 @@ const TableAPI = (url) => {
376
376
  param = param.concat(`${key}=${item}&`)
377
377
  return param
378
378
  }, "")
379
- console.log(param)
380
379
  return query.concat(param)
381
380
  } else {
382
381
  return query.concat(`${key}=%${filters[key]}%&`)
@@ -0,0 +1,10 @@
1
+ .avatar {
2
+ border-radius: 100%;
3
+ background-color: rgba(200,200,200,.1);
4
+ overflow: hidden;
5
+ }
6
+
7
+ .avatar.small {
8
+ width: 3rem;
9
+ height: 3rem;
10
+ }
@@ -0,0 +1,24 @@
1
+ import React from 'react'
2
+ import './Avatar.css'
3
+
4
+ /**
5
+ * Avatar
6
+ */
7
+ export const Avatar = (props) => {
8
+
9
+ const { id, name, src, size="small", clickable=false, action} = props
10
+
11
+ function click() {
12
+ if (clickable) {
13
+ action(id)
14
+ }
15
+ }
16
+
17
+ const style = clickable ? 'clickable' : ''
18
+ const className= `avatar ${size} ${style}`
19
+ return (
20
+ <div className={className} onClick={click}>
21
+ { src ? <img src={src} /> : <span>{name}</span>}
22
+ </div>
23
+ )
24
+ }
@@ -1,4 +1,5 @@
1
1
  export * from './login/LoginBox'
2
2
  export * from './login/ResetPasswordBox'
3
3
  export * from './viewer/Viewer'
4
- export * from './kanban/Kanban'
4
+ export * from './kanban/Kanban'
5
+ export * from './avatar/avatar'