🐛 state-derived properties and chidren

This commit is contained in:
kawamataryo 2023-08-17 20:03:49 +09:00
parent 2e8fc6f5ed
commit 02abeab4f5

View File

@ -1,7 +1,8 @@
import type { ProfileView, ViewerState } from "@atproto/api/dist/client/types/app/bsky/actor/defs"
import van from 'vanjs-core'
const { a, div, p, img, button } = van.tags
const { a, div, p, img, button, span } = van.tags
export type UserCellBtnLabel = {
add: string,
@ -64,13 +65,13 @@ const ActionButton = ({ statusKey, profile, btnLabel, addAction, removeAction }:
label.val = `${btnLabel.progressive} on Bluesky`
}
return () => button({
class: `action-button ${beingClass.val} ${processingClass.val} ${justAppliedClass.val}`,
return button({
class: () => `action-button ${beingClass.val} ${processingClass.val} ${justAppliedClass.val}`,
onclick: onClick,
onmouseover: onMouseover,
onmouseout: onMouseout,
},
label.val,
() => label.val,
)
}