Git Product home page Git Product logo

Comments (5)

montyclt avatar montyclt commented on May 18, 2024 1

Hello @einazare,

Thanks for you response.

I'm trying use StatsCard component standalone following the above instructions, but I'm getting error:

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
Check the render method of `StatsCard`.

Edit:

I solve it, the problem was in the icon prop.

I changed:

<StatsCard icon={<Icon>storage</Icon>} />

To:

<StatsCard icon={() => <Icon>storage</Icon>} />

from material-dashboard-react.

einazare avatar einazare commented on May 18, 2024

Hello @idcmp ,

And thank you for your interest in using our products.
If you want a component of ours to add it to our project you need to copy it in your project and all its dependencies.
For example, if you want the Timeline component, just copy src/components/Timeline/Timeline.jsx, src/assets/jss/material-dashboard-pro-react/components/timelineStyle.jsx and you will also need some stuff from src/assets/jss/material-dashboard-pro-react.jsx.

Hope that information helps you. Please let us know if we can help you with anything else.

Best,
Manu

from material-dashboard-react.

idcmp avatar idcmp commented on May 18, 2024

Hey Manu! Thanks for this. I'd like to keep them to the side, so I'm guessing that means I need to massage the imports for what I need. If that's not the case let me know. Otherwise, thanks!

from material-dashboard-react.

montyclt avatar montyclt commented on May 18, 2024

Why not uploading standalone components into npm?

from material-dashboard-react.

einazare avatar einazare commented on May 18, 2024

Hello @montyclt ,

That is a great idea, but it is kind of hard to have a dashboard split into multiple components on npm.
On each update of any of our dependencies, we would than have to update each of that component.
It would be a bit hard working on dozens of projects, just to create one product such as this dashboard.
We've already talked about doing something like this, but we need to figure out a way to make it easier for both us and our clients to use the components.

Hope that information helps you. Please let us know if we can help you with anything else.

Best,
Manu

from material-dashboard-react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.