feat(component): add FileUploader

Closes #16
This commit is contained in:
Eric Liu 2019-12-23 20:59:56 -08:00
commit 85c4a14b2a
25 changed files with 546 additions and 28 deletions

View file

@ -23,13 +23,10 @@
let buttonRef = undefined;
$: {
if (ctx && buttonRef) {
ctx.declareRef({ name: 'buttonRef', ref: buttonRef });
}
$: if (ctx && buttonRef) {
ctx.declareRef({ name: 'buttonRef', ref: buttonRef });
}
const _class = cx(
$: _class = cx(
'--btn',
size === 'field' && '--btn--field',
(size === 'small' || small) && '--btn--sm',
@ -47,7 +44,7 @@
hasIconOnly && tooltipAlignment && `--tooltip--align-${tooltipAlignment}`,
className
);
const buttonProps = {
$: buttonProps = {
role: 'button',
type: href && !disabled ? undefined : type,
tabindex,