-
Notifications
You must be signed in to change notification settings - Fork 12
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: add border to media in media-block #722
Conversation
Preview is ready. |
src/blocks/Media/Media.tsx
Outdated
@@ -16,7 +16,7 @@ export const MediaBlock = (props: MediaBlockProps) => { | |||
return ( | |||
<MediaBase {...props} onScroll={() => setPlay(true)}> | |||
<MediaBase.Card> | |||
<Media {...mediaThemed} playVideo={play} /> | |||
<Media {...mediaThemed} playVideo={play} border={border} rounded /> |
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.
What is rounded
?
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.
PR was completely refactored. In discussion we came up with the solution that there should be an mixin added to media component
@@ -29,4 +29,6 @@ import * as MediaStories from './Media.stories.tsx'; | |||
|
|||
[`buttons?: Button[]` — An array with button objects](?path=/docs/documentation-types--docs#button) | |||
|
|||
`border?: boolean` — Image border |
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 here types border: 'line' | 'shadow' | 'none'
we can set 'shadow' as !disableShadow and deprecate this 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.
sure
src/components/Media/Media.scss
Outdated
border: 1px solid var(--g-color-line-generic); | ||
} | ||
|
||
&_rounded { |
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.
It was rounded before if I am not mistaken?
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.
PR was completely refactored. In discussion we came up with the solution that there should be an mixin added to media component
This decision made this comment non-relevant
6dfb5f6
to
13f5128
Compare
13f5128
to
dc93876
Compare
src/blocks/Media/Media.tsx
Outdated
const {media} = props; | ||
const {media, border = 'shadow', disableShadow} = props; | ||
|
||
const mediaBaseShadow = disableShadow || border !== 'shadow'; |
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.
We need another naming for mediaBaseShadow
because it is boolean flag
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.
changed
No description provided.