Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds the Page Card component #2286

Open
wants to merge 8 commits into
base: proj-docs-v3
Choose a base branch
from
Open

Adds the Page Card component #2286

wants to merge 8 commits into from

Conversation

adityathakurxd
Copy link
Contributor

@adityathakurxd adityathakurxd commented Jun 17, 2024

Usage:

<PageCard showCta={true} showImage={true} title={"Basic Concepts"} icon={"PipIcon"} description={"Learn the basic architecture to understand how your app talks to 100ms servers"} />

With Image

Screenshot 2024-06-17 at 2 06 41 PM

Copy link

vercel bot commented Jun 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
100ms-docs ✅ Ready (Inspect) Visit Preview Jun 17, 2024 11:44am


const PageCard = ({
showCta = true,
showTag = false,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be renamed to tag and it can be used in place of "Tag Text". If this is not present, we don't need to render the tag

const PageCard = ({
showCta = true,
showTag = false,
showImage = false,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's accept the image URL here and render that instead of the hardcoded link used. If this is not provided, we don't render the img element - same as above

import { ArrowRightIcon } from '@100mslive/react-icons';

const PageCard = ({
showCta = true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, the prop can be "CTA" with "Read more" as the default. If it is not needed, it can be specified as "" by the author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants