0

I just found out about react suite and it's really good but I can't figure out this error that says component is not exported from rsuite per example 'Attempted import error: 'Card' is not exported from 'rsuite'.' and this is happening very often like where is the component if not from rsuite and the docs for it are really bad it doesn't help much

    import "./App.css";
import "rsuite/dist/styles/rsuite-default.css";
import { Row, Col, Card } from "rsuite";

const styles = {
  padding: 20,
  textAlign: "center",
};

function App() {
  return (
    <div className='App' style={styles}>
      <Row>
        <Col md={6} sm={12}>
          <Card />
        </Col>
        <Col md={6} sm={12}>
          <Card />
        </Col>
        <Col md={6} sm={12}>
          <Card />
        </Col>
        <Col md={6} sm={12}>
          <Card />
        </Col>
      </Row>
    </div>
  );
}

export default App;

I can't find out why this is happening, tried looking up youtube, google or anything but it seems like the community for it is not that big I don't understand and I've had this with a lot of other components. Any help would be appreciated I really wanna use this library it looks really good

Simon Guo
  • 83
  • 5
syc
  • 15
  • 7

1 Answers1

0

There is no Card component in the rsuite library, but you can implement it by combining Panel components.

https://rsuitejs.com/components/panel

In addition, the import of components is explained at the beginning of each component's documentation.

enter image description here

Simon Guo
  • 83
  • 5
  • What you're saying is that the 'card' and 'paragraph' tags are just placeholders and not actual components? – syc Oct 29 '20 at 07:10
  • Yes. You see that the `Card` in the document example is also encapsulated based on the `Panel` component. – Simon Guo Oct 29 '20 at 11:17
  • Thanks, it doesn't mention anywhere that it's a placeholder. – syc Oct 30 '20 at 11:00