diff --git a/apps/common/mobile/lib/component/SvgIcon.jsx b/apps/common/mobile/lib/component/SvgIcon.jsx new file mode 100644 index 0000000000..fa2e36faa7 --- /dev/null +++ b/apps/common/mobile/lib/component/SvgIcon.jsx @@ -0,0 +1,9 @@ +import React from 'react'; + +export default function SvgIcon({ symbolId, className = 'svg-icon', ...props }) { + return ( + + + + ); +} diff --git a/apps/common/mobile/resources/less/icons.less b/apps/common/mobile/resources/less/icons.less index dddbe326ca..1733672e5e 100644 --- a/apps/common/mobile/resources/less/icons.less +++ b/apps/common/mobile/resources/less/icons.less @@ -1,6 +1,11 @@ @import "./ios/icons"; @import "./material/icons"; +.icon-svg { + width: 24px; + height: 24px; +} + i.icon { &.icon-paste { width: 24px; diff --git a/apps/documenteditor/mobile/src/less/icons-common.less b/apps/documenteditor/mobile/src/less/icons-common.less index f100955f52..bec4e56b65 100644 --- a/apps/documenteditor/mobile/src/less/icons-common.less +++ b/apps/documenteditor/mobile/src/less/icons-common.less @@ -1,3 +1,8 @@ + +.icon-svg { + fill: @brand-word; +} + // Formats i.icon { diff --git a/vendor/framework7-react/build/webpack.config.js b/vendor/framework7-react/build/webpack.config.js index c989b48725..a9f3bccdc7 100644 --- a/vendor/framework7-react/build/webpack.config.js +++ b/vendor/framework7-react/build/webpack.config.js @@ -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: {