-
Notifications
You must be signed in to change notification settings - Fork 22
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
AB# 294 Feature - card component #101
Conversation
|
||
export class SddsCard { | ||
// @Element() el: HTMLElement; | ||
@Prop() clickable: boolean = false; |
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.
clickable prop is not used anywhere?
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.
Removed
shadow: true | ||
}) | ||
|
||
export class SddsCard { |
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.
Can we use Card as the class name
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.
Fixed
<div class="sdds-row demo"> | ||
|
||
<div class="sdds-col-xxlg-5 sdds-col-xlg-5 sdds-col-lg-5 sdds-hide-md"> | ||
<sdds-card clickable="true"> |
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.
From my understanding, at this moment sdds-card is not used for anything. Clickable styling is added from class "sdds-clickable". Is that correct? Maybe then remove sdds-card for now for this release to avoid confusion.
Because right now it feels like I need to add sdds-card clickable=true when it is doing nothing, and class sdds-clickable inside slot, which is not a suitable usecase of using slot (class should be added inside the web component, depends on the prop available). And of course, feels like a duplication for clickable prop :)
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.
Removed the prop for now, it was related with expand solution, but no longer in use
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.
I also removed anything related with the web-component for now
@import '@scania/typography/dist/scss/mixins'; | ||
@import '@scania/typography/dist/scss/tokens'; | ||
|
||
.sdds-card { |
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.
Use prefix for sdds?
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.
Fixed
<sdds-dropdown-option value="option-3">Option 3</sdds-dropdown-option> | ||
</sdds-dropdown> | ||
``` | ||
# c-dropdown |
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.
merge from main and rebuild maybe? generated wrong readme
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.
Fixed! Was above the auto-generated doc part that had the be manually changed
} | ||
|
||
//avatar | ||
.#{$prefix}-card-header-avatar { |
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.
For the avatar, maybe we can add the correct wrapper? Right now it is a circle SVG, but in a real implementation in can be any image with border radius 50% right?. SO maybe add that to a div? Something like div border-radius 50% overflow hidden, So developer can add anything inside.
Hand-cursor is missing on interactive cards. |
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.
Looks good!
margin-right: 16px; | ||
height: 36px; | ||
width: 36px; | ||
border-radius: 50%; |
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.
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.
Fixed
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.
Nice work!
Describe pull-request
Describe what the pull-request is about
Added card-webcomponent
Link color visited change to match blue instead of grey
TODO:
Solving issue
Add which issue this pull-request solves by adding # plus the number of the issue (for example #123)
Fixes: AB#294
How to test
Add description how to test if possible
Additional context
Add any other context about the pull-request here.
Some examples might come from some chat with niklas and not shown in the figma files