Commit 9fcd429d authored by tom's avatar tom

add sprite build step to Docker file; remove unused Icon component; fix svgo config

parent 14a7e95c
...@@ -58,6 +58,7 @@ RUN ./collect_envs.sh ./docs/ENVS.md ...@@ -58,6 +58,7 @@ RUN ./collect_envs.sh ./docs/ENVS.md
# Build app for production # Build app for production
RUN yarn build RUN yarn build
RUN yarn svg:build-sprite
### FEATURE REPORTER ### FEATURE REPORTER
......
module.exports = { module.exports = {
plugins: [ plugins: [
// TODO @tom2drum pick up plugins from default preset {
// { name: 'preset-default',
// name: 'preset-default', params: {
// params: { overrides: {
// overrides: { removeViewBox: false,
// removeViewBox: false, removeHiddenElems: false,
// cleanupIds: false, },
// removeUselessDefs: false, },
// collapseGroups: false, },
// },
// },
// },
'removeDimensions', 'removeDimensions',
], ],
js2svg: { js2svg: {
......
import { Skeleton, Icon as ChakraIcon } from '@chakra-ui/react';
import type { IconProps, As } from '@chakra-ui/react';
import React from 'react';
interface Props extends IconProps {
isLoading?: boolean;
as: As;
}
const Icon = ({ isLoading, ...props }: Props, ref: React.LegacyRef<SVGSVGElement>) => {
return (
<Skeleton isLoaded={ !isLoading } boxSize={ props.boxSize } w={ props.w } h={ props.h } borderRadius={ props.borderRadius }>
<ChakraIcon { ...props } ref={ ref }/>
</Skeleton>
);
};
export default React.memo(React.forwardRef(Icon));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment