vectopus / atlas-icons-react Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I'm having an issue making the icons work with a className attribute to change colors.
Here's how tabler/icons had it implemented
import { FC, SVGAttributes } from 'react';
type TablerIconProps = Omit<SVGAttributes<SVGElement>, 'color' | 'stroke'> & {
color?: SVGAttributes<SVGElement>['stroke'];
size?: SVGAttributes<SVGElement>['width'];
stroke?: SVGAttributes<SVGElement>['strokeWidth'];
}
type TablerIcon = FC<TablerIconProps>;
I've trying to use the React library and it looks like this package may not include all the icons from the parent library. Is this accurate?
One example happens when trying to utilize one of the download icons by first importing it:
import { NavigationMoveMovementArrowDirectionPointerNavigateDownDownload } from '@vectopus/atlas-icons-react';
Then add it to the render function:
<NavigationMoveMovementArrowDirectionPointerNavigateDownDownload size={24} />
This results in the following error:
Attempted import error: 'NavigationMoveMovementArrowDirectionPointerNavigateDownDownload' is not exported from '@vectopus/atlas-icons-react'.
Getting this error with version 0.0.10, didn't have any error before on 0.0.7, not sure what changed?
node_modules/@vectopus/atlas-icons-react/index.js:1
import _extends from '@babel/runtime/helpers/extends';
^^^^^^
SyntaxError: Cannot use import statement outside a module
I am getting the error below when I save the file (transpiles Typescript):
Field 'browser' doesn't contain a valid alias configuration
It seems like it's not finding a directory of some sort?
Field 'browser' doesn't contain a valid alias configuration
resolve as module
/Users/p009509B/Sharepoint/spfx-pweb-home/node_modules/@vectopus/atlas-icons-react/node_modules doesn't exist or is not a directory
/Users/11221222/Sharepoint/spfx-pweb-home/node_modules/@vectopus/atlas-icons-react/lib doesn't exist or is not a directory
/Users/11221222/Sharepoint/spfx-pweb-home/node_modules/@vectopus/node_modules doesn't exist or is not a directory
/Users/11221222/Sharepoint/spfx-pweb-home/node_modules/@vectopus/lib doesn't exist or is not a directory
this is how the folder looks like in node_modules:
I am using
I am not sure if I installed incorrectly or have configured something wrong. Please advise.
I'm having a hard time trying to import an icon in a nextjs app using this library.
info - Creating an optimized production build
Failed to compile.
./node_modules/@vectopus/atlas-icons-react/index.js
Module parse failed: 'import' and 'export' may appear only with 'sourceType: module' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.
See https://webpack.js.org/concepts#loaders
> import _extends from '@babel/runtime/helpers/extends';
| import * as React from 'react';
|
Import trace for requested module:
./node_modules/@vectopus/atlas-icons-react/index.js
./components/UserCategoryManagement.tsx
> Build failed because of webpack errors
error Command failed with exit code 1.
Repro:
Just import any icon and try to build the app.
Env:
Next.js v13.0.7
Node v18.12.1
Not related but also consider adding support for TS so users don't have to create a .d.ts file.
Thanks for these amazing icons!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.