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(PlaceholderContainer): add placeholder container component #31

Merged
merged 21 commits into from
Apr 28, 2023

Conversation

Marginy605
Copy link
Contributor

No description provided.

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@Marginy605 Marginy605 requested a review from amje April 11, 2023 12:59
@Marginy605 Marginy605 force-pushed the placeholder-container branch from 20c17e7 to a46a953 Compare April 13, 2023 15:04
@Marginy605 Marginy605 requested a review from amje April 17, 2023 12:37
}

&__description {
margin-top: 10px;
Copy link
Contributor

Choose a reason for hiding this comment

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

variables.$smallOffset?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

private renderContent() {
const {html, contentSize, contentClassName} = this.props;

const content = html ? (
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's use renderContent function prop instead of html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@Marginy605 Marginy605 force-pushed the placeholder-container branch from 654439e to 5152296 Compare April 20, 2023 09:28
CODEOWNERS Outdated
@@ -1 +1,2 @@
/src/components/FormRow @ogonkov
/src/components/PlaceholderContainer @marginy
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be GitHub login

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops) fixed

type PlaceholderContainerImageSettingsProps = {
url: string;
alt?: string;
size?: number;
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if we need this prop, we already have image constraints. In fact, image from url can be rectangle shape or smaller size than image contanier

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good point. I removed this prop.

}

return (
<div className={b('action')}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe rename it to plural form, actions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed


import './PlaceholderContainerAction.scss';

const b = block('placeholder-container-action');
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be the same block placeholder-container and action is an element of the block

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed
I've also refactored structure of types and constants a little bit

@Marginy605 Marginy605 force-pushed the placeholder-container branch from 8697ca3 to 951e2d7 Compare April 28, 2023 16:16
@Marginy605 Marginy605 merged commit 018095e into main Apr 28, 2023
@Marginy605 Marginy605 deleted the placeholder-container branch April 28, 2023 17:10
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.

3 participants