-
Notifications
You must be signed in to change notification settings - Fork 22
feat: remove block header, add title #341
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
Conversation
|
Preview is ready. |
1306298 to
9fb2ba2
Compare
| `type: "title"` | ||
|
|
||
| `text: text` — Title text | ||
| `title:` |
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.
should there be a description of the prop here?
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 is in the line 13.
Or you mean the title himself?
It's an object with properties below
- text
- textSize
- url
- resetMargin
| return ( | ||
| <AnimateBlock className={b()} animate={animated}> | ||
| <BlockHeader title={title} description={description} className={b('header')} /> | ||
| <Title title={title} description={description} className={b('header')} /> |
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.
is it strange that component Title has property title?) Whole component is title
Or in this case description should became subtitle may be
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.
I renamed description to subtitle
src/components/Title/TitleItem.tsx
Outdated
| resetMargin?: boolean; | ||
| } | ||
|
|
||
| const Title = (props: TitleItemFullProps) => { |
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.
TitleItem?
src/sub-blocks/Content/Content.tsx
Outdated
| 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}} />} |
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.
title={titleProps}
src/sub-blocks/Content/Content.tsx
Outdated
| ? ({text: title, textSize: getTextSize(size)} as TitleProps) | ||
| : title; | ||
| ? ({text: title, textSize: getTextSize(size), resetMargin: true} as TitleItemProps) | ||
| : {...title, resetMargin: true}; |
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.
resetMargin is true by default in TitleItem
No description provided.