UNPKG

@blocklet/ui-react

Version:

Some useful front-end web components that can be used in Blocklets.

44 lines (41 loc) 1.3 kB
/* eslint-disable import/prefer-default-export */ import PropTypes from 'prop-types'; export const BlockletMetaProps = PropTypes.shape({ appLogo: PropTypes.node, appName: PropTypes.string, theme: PropTypes.shape({ background: PropTypes.string, }), enableConnect: PropTypes.bool, enableLocale: PropTypes.bool, navigation: PropTypes.arrayOf( PropTypes.shape({ title: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), link: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), icon: PropTypes.string, items: PropTypes.arrayOf( PropTypes.shape({ title: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), link: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), }) ), }) ), }); export const SessionManagerProps = PropTypes.shape({ showText: PropTypes.bool, showRole: PropTypes.bool, switchDid: PropTypes.bool, switchProfile: PropTypes.bool, switchPassport: PropTypes.bool, disableLogout: PropTypes.bool, onLogin: PropTypes.func, onLogout: PropTypes.func, onSwitchDid: PropTypes.func, onSwitchProfile: PropTypes.func, onSwitchPassport: PropTypes.func, menu: PropTypes.array, menuRender: PropTypes.func, dark: PropTypes.bool, size: PropTypes.number, });