mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-02-10 18:05:32 +08:00
[mobile] added SvgIcon component
This commit is contained in:
9
apps/common/mobile/lib/component/SvgIcon.jsx
Normal file
9
apps/common/mobile/lib/component/SvgIcon.jsx
Normal file
@ -0,0 +1,9 @@
|
||||
import React from 'react';
|
||||
|
||||
export default function SvgIcon({ symbolId, className = 'svg-icon', ...props }) {
|
||||
return (
|
||||
<svg className={className} {...props}>
|
||||
<use href={`#${symbolId}`} />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
@ -1,6 +1,11 @@
|
||||
@import "./ios/icons";
|
||||
@import "./material/icons";
|
||||
|
||||
.icon-svg {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
i.icon {
|
||||
&.icon-paste {
|
||||
width: 24px;
|
||||
|
||||
@ -1,3 +1,8 @@
|
||||
|
||||
.icon-svg {
|
||||
fill: @brand-word;
|
||||
}
|
||||
|
||||
// Formats
|
||||
|
||||
i.icon {
|
||||
|
||||
@ -40,6 +40,7 @@ const config = {
|
||||
extensions: ['.js', '.jsx', '.json'],
|
||||
alias: {
|
||||
'@': resolvePath(`../../apps/${editor}/mobile/src`),
|
||||
'@common': resolvePath('../../apps/common/mobile'),
|
||||
},
|
||||
modules: [path.resolve(__dirname, '..', 'node_modules'), 'node_modules'],
|
||||
},
|
||||
@ -176,7 +177,7 @@ const config = {
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
|
||||
test: /\.(png|jpe?g|gif)(\?.*)?$/,
|
||||
use: [
|
||||
{
|
||||
loader: 'url-loader',
|
||||
@ -189,6 +190,11 @@ const config = {
|
||||
]
|
||||
},
|
||||
{
|
||||
test: /\.svg$/,
|
||||
use: {
|
||||
loader: "svg-sprite-loader",
|
||||
}
|
||||
}, {
|
||||
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
|
||||
Reference in New Issue
Block a user