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

Card components [fixes #765] #843

Merged
merged 3 commits into from
Mar 19, 2020
Merged

Card components [fixes #765] #843

merged 3 commits into from
Mar 19, 2020

Conversation

carlfairclough
Copy link
Contributor

Adds a card and card list component

Description

Cards

Cards can now be created which accept the following:

  • level: optional, Number, default: 3 defines the h# tag for the card

  • header: optional, String pass either a link to an image, or an emoji here

  • hero: optional, Boolean, default: false if an image is passed to the card, this will display it as a hero

  • leftimg: optional, Boolean, default: false if an image is passed to the card, this will display it in a left column

  • title: required, String the title

  • content: required, String the text under the subtitle

  • link: optional, Object

    • to the url
    • text the text to display
  • button: optional, Object or Array of 2 items

    • to the url
    • text the text to display
  • clickable: optional, Boolean, default: true This toggles whether the card is clickable

link and button are mutually exclusive
leftimg and hero are mutually exclusive

Card List

  • items: required, Array an array of objects with card properties
  • level: optional, Number, default: 3 defines the h# tag for the cards
  • desktopColumns: optional, default: 3 the number of columns on desktop
  • tabletColumns: optional, default: 3 the number of columns on tablet
  • smallTabletColumns: optional, default: 2 the number of columns on small tablets/large phones
    For small mobile devices, one column is always displayed.

Related Issue

#765

Screenshots (if appropriate):

Start Building   Ethereum org
Start Building   Ethereum org-dark

Copy link
Member

@samajammin samajammin left a comment

Choose a reason for hiding this comment

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

Looks good - added a few comments.

I love your screenshot examples - could you please add those as examples to the /style-guide/? Seeing these different variations in action would help me understand the functionality.

docs/.vuepress/components/Card.vue Outdated Show resolved Hide resolved
docs/.vuepress/components/Card.vue Outdated Show resolved Hide resolved
docs/.vuepress/components/Card.vue Outdated Show resolved Hide resolved
pin links/buttons to bottom

Fixed box shadow in dark mode
Copy link
Member

@samajammin samajammin left a comment

Choose a reason for hiding this comment

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

This looks great. Once #839 is merged, let's add a section to the style guide with the examples you displayed in your screenshot.

@samajammin samajammin merged commit b31dc2f into ethereum:dev Mar 19, 2020
@samajammin samajammin mentioned this pull request Mar 20, 2020
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.

2 participants