mintlify / components

UI components for documentation made with React and TailwindCSS.
MIT License
77 stars 11 forks source link

feat: card supports image prop that readers passed image on top of the card #67

Closed sboy99 closed 1 year ago

sboy99 commented 1 year ago

This PR will enable card component accept image prop that is basically an image link. This image is passed to img element that renders an image. closes #57

Screenshots

Screenshot from 2023-02-14 18-30-28 Screenshot from 2023-02-14 18-31-09 Screenshot from 2023-02-14 18-35-23 Screenshot from 2023-02-14 18-35-58

sboy99 commented 1 year ago

There's a problem with prettier formatting I guess, When I'm saving files this extra value is getting added. How can I fix them?

Screenshot from 2023-02-14 19-12-17

Prettier auto-save is enabled in my computer.

benjamin-shen commented 1 year ago

@sboy99 try this: https://stackoverflow.com/a/71063465

sboy99 commented 1 year ago

That was a mistake while I was resolving merge conflict className in component got replaced by previous so the changes were lost that image is not going to the edge. Is it working now?

ghost commented 1 year ago

@sboy99 can you make a PR in mint updating the Card docs with the new image property?

sboy99 commented 1 year ago

Sure I will do

sboy99 commented 1 year ago

Should I update only API reference or should I showcase an example component with API reference as well