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

feat: add border to media in media-block #722

Merged
merged 4 commits into from
Jan 16, 2024

Conversation

niktverd
Copy link
Contributor

No description provided.

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

gorgeousvlad
gorgeousvlad previously approved these changes Nov 29, 2023
@@ -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 />
Copy link
Contributor

Choose a reason for hiding this comment

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

What is rounded?

Copy link
Contributor Author

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
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

border: 1px solid var(--g-color-line-generic);
}

&_rounded {
Copy link
Contributor

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?

Copy link
Contributor Author

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

@niktverd niktverd force-pushed the add_border_to_media_in_media_block branch from 6dfb5f6 to 13f5128 Compare December 5, 2023 10:15
@niktverd niktverd changed the title feat: add border to media in media-block and refactor it in layout-items feat: add border to media in media-block Dec 5, 2023
@niktverd niktverd force-pushed the add_border_to_media_in_media_block branch from 13f5128 to dc93876 Compare December 5, 2023 10:18
const {media} = props;
const {media, border = 'shadow', disableShadow} = props;

const mediaBaseShadow = disableShadow || border !== 'shadow';
Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

@niktverd niktverd merged commit d960ea0 into main Jan 16, 2024
3 checks passed
@niktverd niktverd deleted the add_border_to_media_in_media_block branch January 16, 2024 13:11
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.

4 participants