-
Notifications
You must be signed in to change notification settings - Fork 14
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: added mediaView for image and theme for button in banner block #794
feat: added mediaView for image and theme for button in banner block #794
Conversation
Preview is ready. |
@@ -20,4 +20,7 @@ import * as BannerStories from './Banner.stories.tsx'; | |||
`color?: string` — Background color | |||
|
|||
`button: Button` — Button | |||
|
|||
`mediaView?: full | fit` — full is default value, the media content covers all widht and height. Fit - media content has real sizes and locates in the middle |
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.
typos in width
word
@@ -143,7 +143,8 @@ export interface BannerCardProps { | |||
disableCompress?: boolean; | |||
color?: ThemeSupporting<string>; | |||
theme?: TextTheme; | |||
button: Pick<ButtonProps, 'text' | 'url' | 'target'>; | |||
button: Pick<ButtonProps, 'text' | 'url' | 'target' | 'theme'>; | |||
mediaView?: 'fit' | 'full'; |
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 are configuring object-fit, it can have the values 'contain', 'cover', etc. I think they should be used as values for this prop. And create modifiers for these values, in your case only contain
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.
but in header we are using the same format. I want to keep consistence view
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 have a lot of settings in the header besides "object-fit".
In the case of the header, I would suggest using "contain", etc. as a value ,but I have not reviewed this code before
@gorgeousvlad what do you think ?
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.
if we wanna get it same in Header and Banner, suppose we should create type, type MediaView = 'fit' | 'full'
to use for both and keep same values.
In case we want to make them different (use contain
in Banner) lets name theme different
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.
added MediaView type
No description provided.