byted-girls-components
FansGift
用法
import 'byted-girls-components/lib/all.css';
import { FansGift } from 'byted-girls-components';
class Biz extends React.PureComponent {
render() {
return (
<FansGift
isLogin={isLogin}
activity={activity}
activityId={activityId}
joinActivity={joinActivity}
registerShare={registerShare}
share={share}
sendAppLog={sendAppLog}
openLoginPanel={openLoginPanel}
/>
);
}
}
属性解释
- isLogin: PropTypes.bool.isRequired
- activity: PropTypes.object.isRequired
- activityId: PropTypes.string.isRequired
- joinActivity: PropTypes.func
- registerShare: PropTypes.func
- share: PropTypes.func
- sendAppLog: PropTypes.func
- openLoginPanel: PropTypes.func
其中 joinActivity
, registerShare
, share
, sendAppLog
, openLoginPanel
的默认实现是 noop
activity
的结构请参考 https://mock.bytedance.net/mock/5af25a0c1e32614dd999f170/girls/web/activity/gift/api#!method=get