Skip to content

Conversation

@yuberdysheva
Copy link
Contributor

No description provided.

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@yuberdysheva yuberdysheva force-pushed the yuberdysheva/block-header-refactoring branch from 1306298 to 9fb2ba2 Compare May 16, 2023 18:59
@yuberdysheva yuberdysheva requested a review from aeksandla May 17, 2023 10:06
`type: "title"`

`text: text` — Title text
`title:`
Copy link
Collaborator

Choose a reason for hiding this comment

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

should there be a description of the prop here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is in the line 13.
Or you mean the title himself?
It's an object with properties below

  • text
  • textSize
  • url
  • resetMargin

aeksandla
aeksandla previously approved these changes May 22, 2023
return (
<AnimateBlock className={b()} animate={animated}>
<BlockHeader title={title} description={description} className={b('header')} />
<Title title={title} description={description} className={b('header')} />
Copy link
Contributor

Choose a reason for hiding this comment

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

is it strange that component Title has property title?) Whole component is title
Or in this case description should became subtitle may be

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I renamed description to subtitle

resetMargin?: boolean;
}

const Title = (props: TitleItemFullProps) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

TitleItem?

return (
<Col className={b({size, centered, theme}, className)} reset sizes={colSizes}>
{title && <Title className={b('title')} {...titleProps} resetMargin />}
{title && <Title className={b('title')} title={{...titleProps}} colSizes={{all: 12}} />}
Copy link
Contributor

Choose a reason for hiding this comment

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

title={titleProps}

? ({text: title, textSize: getTextSize(size)} as TitleProps)
: title;
? ({text: title, textSize: getTextSize(size), resetMargin: true} as TitleItemProps)
: {...title, resetMargin: true};
Copy link
Contributor

Choose a reason for hiding this comment

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

resetMargin is true by default in TitleItem

@yuberdysheva yuberdysheva merged commit b849109 into v3 May 24, 2023
@yuberdysheva yuberdysheva deleted the yuberdysheva/block-header-refactoring branch May 24, 2023 10:09
yuberdysheva pushed a commit that referenced this pull request May 26, 2023
yuberdysheva pushed a commit that referenced this pull request May 31, 2023
yuberdysheva pushed a commit that referenced this pull request Jun 1, 2023
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.

5 participants