@symbo.ls/avatar
Advanced tools
47
index.js
'use strict' | ||
import { Img, Flex } from '@symbo.ls/atoms' | ||
import { Button } from '@symbo.ls/button' | ||
@@ -32,1 +33,47 @@ export const Avatar = { | ||
} | ||
export const AvatarChooser = { | ||
extend: Button, | ||
tag: 'label', | ||
props: { | ||
round: 'C', | ||
gap: 'Y', | ||
padding: 'W2 A W2 W2', | ||
theme: 'tertiary', | ||
position: 'relative', | ||
cursor: 'pointer' | ||
}, | ||
Avatar: { | ||
boxSize: 'B1', | ||
pointerEvents: 'none' | ||
}, | ||
select: { | ||
props: { | ||
outline: 'none', | ||
pointerEvents: 'all', | ||
appearance: 'none', | ||
border: 'none', | ||
width: '100%', | ||
height: '100%', | ||
background: 'none', | ||
color: 'currentColor', | ||
fontSize: 'A', | ||
lineHeight: 1, | ||
margin: '0 0 0 -B1+X', | ||
padding: '0 A 0 B1+X' | ||
}, | ||
attr: { name: 'avatar-chooser', id: 'avatar-chooser' }, | ||
childExtend: { tag: 'option', text: ({ state }) => state.text }, | ||
$setCollection: ({ parent }) => parent.props.options, | ||
on: { | ||
change: (ev, { parent }) => { | ||
parent.user.update({ key: ev.target.value }) | ||
} | ||
} | ||
} | ||
} |
{ | ||
"name": "@symbo.ls/avatar", | ||
"version": "2.11.16", | ||
"version": "2.11.70", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"gitHead": "9d17c62d340b3ed3ecfba460d9f5656b324a5bbb", | ||
"gitHead": "329c180a4cf02896ec76566a5b2f5368f62a6b06", | ||
"dependencies": { | ||
@@ -8,0 +8,0 @@ "@symbo.ls/atoms": "latest" |
3197
42.47%86
91.11%