-
Notifications
You must be signed in to change notification settings - Fork 4k
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 #1359
feat(Card): add link prop #1359
Conversation
Let's also add example for |
Codecov Report
@@ Coverage Diff @@
## master #1359 +/- ##
==========================================
+ Coverage 99.74% 99.74% +<.01%
==========================================
Files 140 140
Lines 2390 2392 +2
==========================================
+ Hits 2384 2386 +2
Misses 6 6
Continue to review full report at Codecov.
|
@layershifter I added one |
d6b4557
to
3bf57bb
Compare
meta='Scientist' | ||
description='Rick is a genius scientist whose alcoholism and reckless, nihilistic behavior are a source of concern for his family' | ||
/> | ||
</Card.Group> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's split these examples to separate files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, but in the actual docs, they're next to each other. Since they're showing the same property functionality, shouldn't they be together?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can make these appear together while still having separate example files. The advantage is that each example will have its own code editor.
To do this, create a new file and add it to the index.js
in this directory just after the CardExampleLinkCard.js
entry, but do not include a title
nor description
:
docs/app/Examples/views/Card/Content/index.js
<ComponentExample
title='Link'
description='A card can be formatted to link to other content.'
examplePath='views/Card/Content/CardExampleLinkCard'
/>
<ComponentExample
examplePath='views/Card/Content/CardExampleLinkCardProp'
/>
The second example will render directly below the title/description of the first example. This is common in our docs for grouping examples.
src/views/Card/Card.js
Outdated
@@ -55,6 +55,9 @@ export default class Card extends Component { | |||
/** A card can contain an Image component. */ | |||
image: customPropTypes.itemShorthand, | |||
|
|||
/** A card can be formatted to behave like a link (hover effects, pointer cursor) */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go with our doc site description:
A card can be formatted to link to other content.
Since, the specifics of the style can vary from theme to theme.
3bf57bb
to
9a4c087
Compare
I updated with your suggestions |
Changes look great, I'll merge as soon as tests pass:
|
9a4c087
to
c97f89c
Compare
I've just pushed a fix for the description prop syntax error. |
Yeah I see it. Odd, didn't show up as an error locally |
Looks like this is a lint error, so you'd only see it by running Not as intuitive though, sorry about that :) |
Oh yeah I ran the lint check locally as well and it was fine. Oh well, is this good to merge now? |
Oh, that is odd... perhaps outdated deps? Not sure, but, we're good to go! Thanks much for the contribution, hope to have you around for some more 👍 |
Thanks for being patient! I have had a great experience so far with this project, and I hope to contribute more. |
Whoops, @layershifter we missed typings here :/ |
Released in |
* feat(Card): add link prop * docs(Card): add example for card link prop * fix(CardExampleLinkCardProp): description prop
Fixes #1350
Does this need extra tests to check that the correct styles were applied to the card if it has the
link
prop?