-
-
Notifications
You must be signed in to change notification settings - Fork 47.5k
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
希望Notification 在省略description情况下,message居中 #5846
Comments
notification.info({
message: <div style={{ textAlign: 'center' }}>message</div>,
}) |
实际上我想说的是垂直居中~ |
我觉得可以description使用boolean类型来针对一下~ |
都是没有 description 的情况,标题对于是否换行的样式不一样,这一点比较麻烦。 |
Sorry for that I am not good at CSS,so maybe I can't consider it too depth,probably below is not the best solution.And if I understand correct,if you just want one line and multiple lines can in the middle and just use one css class.Yes,you can do that. .e.g. :
|
target => icon, thank you for your train of thought and the CSS is very awesome, 3q |
Icon should not be vertically centered, it is against our design spec. |
Actually, notification was used to be like @NE-SmallTown described in antd@1.x |
Ye,sorry for forgoting to say,that's why I don't suggest him to send a pr because I am not sure it is what antd really needs.And I make it by set style rather than class is because hope that if it is not a good choice for antd,you can just override the style to realize your goal. |
Found a very tricky solution inspired by http://stackoverflow.com/a/22901203/3040605 😃 |
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
What problem does this feature solve?
Message 借用 Notification 的展现形式,但是内容上没那么需要显示的详情信息
What does the proposed API look like?
notification[status].({message, description: false)
The text was updated successfully, but these errors were encountered: