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

feat(Card): Add link prop to Card #1350

Closed
levithomason opened this issue Feb 20, 2017 · 5 comments
Closed

feat(Card): Add link prop to Card #1350

levithomason opened this issue Feb 20, 2017 · 5 comments

Comments

@levithomason
Copy link
Member

This should be a boolean prop that adds the link className. See SUI core docs for more.

<Card link />
// => <div className="ui link card"></div>
@BrainMaestro
Copy link
Contributor

I'm interested in picking this up, but what does the link prop actually do? It's not immediately obvious. The first example has a href property which links the entire card to that hyperlink because the card is in an anchor tag. The second example with the actual link property doesn't seem to do anything. Am I missing something?

@levithomason
Copy link
Member Author

The link prop simply adds the link className. The link className makes the card behave as a link (hover effects, pointer cursor), even when using a div or tagName other than an a.

Compare these two methods of making a card a "link":

<a class="ui card" href="http://www.dog.com">...
<div class="ui link card">

@BrainMaestro
Copy link
Contributor

Okay that means the description in the docs is confusing. It says

A card can be formatted so that the entire contents link to another page.

Which doesn't match what it actually does which is make the card behave like a link (hover effect and pointer cursor). Does the documentation need to be updated?

Anyway, I'll make a PR to fix this issue

@levithomason
Copy link
Member Author

You make a good point. It can be formatted to appear as a link :)

@levithomason levithomason changed the title Add link prop to Card feat(Card): Add link prop to Card Mar 1, 2017
@ZimNovich
Copy link

In the documentation (https://react.semantic-ui.com/views/card/) it still says:
link {bool} A card can be formatted to link to other content.

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

No branches or pull requests

4 participants