在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):levrik/mdi-react开源软件地址(OpenSource Url):https://github.com/levrik/mdi-react开源编程语言(OpenSource Language):JavaScript 76.6%开源软件介绍(OpenSource Introduction):mdi-reactMaterial Design Icons for React/Preact packaged as single components New v9.0.0 released: See CHANGELOG.md Installationnpm install mdi-react
# or if you use Yarn
yarn add mdi-react Support for Preact is available via the UsageJust search for an icon on materialdesignicons.com and look for its name. For example the icons named import AlertIcon from 'mdi-react/AlertIcon';
import AlertCircleIcon from 'mdi-react/AlertCircleIcon';
const MyComponent = () => {
return (
<div>
{/* The default color is the current text color (currentColor) */}
<AlertIcon color="#fff" />
{/* The default size is 24 */}
<AlertCircleIcon className="some-class" size={16} />
{/* This sets the icon size to the current font size */}
<AlertIcon size="1em" />
</div>
);
}; To change the color on hover you can just use your own class and plain CSS. .some-class:hover {
fill: red;
} You can also add default styling via the .mdi-icon {
background-color: green;
} |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论