dumi-theme-antd-web3
Version:
Ant Design 5.0 官网风格类似的 dumi2 主题插件
43 lines • 2.14 kB
JavaScript
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
import React from 'react';
import { createStyles } from 'antd-style';
import classNames from 'classnames';
import ContributorsList from 'github-contributors-lists';
import ContributorAvatar from "./ContributorAvatar";
import { jsx as ___EmotionJSX } from "@emotion/react";
var useStyle = createStyles(function (_ref) {
var token = _ref.token,
css = _ref.css;
return {
contributorsList: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-block-start: 120px !important;\n margin-block-end: ", "px !important;\n "])), -token.marginLG),
listMobile: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin: 1em 0 !important;\n "]))),
title: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n font-size: ", "px;\n opacity: 0.5;\n margin-block-end: ", "px;\n "])), token.fontSizeSM, token.marginXS),
list: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n clear: both;\n li {\n height: 24px;\n transition: all ", ";\n margin-inline-end: -", "px;\n }\n &:hover {\n li {\n margin-inline-end: 0;\n }\n }\n "])), token.motionDurationSlow, token.marginXS)
};
});
var Contributors = function Contributors(_ref2) {
var filename = _ref2.filename;
var _useStyle = useStyle(),
styles = _useStyle.styles;
if (!filename) {
return null;
}
return ___EmotionJSX("div", {
className: classNames(styles.contributorsList)
}, ___EmotionJSX(ContributorsList, {
cache: true,
repo: "ant-design-web3",
owner: "ant-design",
fileName: filename,
className: styles.list,
renderItem: function renderItem(item, loading) {
return ___EmotionJSX(ContributorAvatar, {
item: item,
loading: loading,
key: item === null || item === void 0 ? void 0 : item.url
});
}
}));
};
export default Contributors;