Search code examples
antdant-design-pro

How to use notifications menu in @ant-design/pro-layout?


I have designed my project with CRA and antd, unfortunately AFAIK antd layout don't have a notifications, user options in the header.

So I tried to use @ant-design/pro-layout, it's bit confusing in the documentation on how to use the notifications and user options in menu.

User notifications in and design pro

Anyone please shed some light on how to achieve this with either in antd or in @ant-design/pro-layout?

Thanks in advance.


Solution

  • I think docs in v4 are still under development but you can downgrade the documentation to v2 and see how they do it (or dig their github repo) what i can find is:

    you have to:

    import NoticeIcon from 'ant-design-pro/lib/NoticeIcon'
    

    see reference here:

    https://v2-pro.ant.design/components/notice-icon

    and more information here :

    https://v2-pro.ant.design/docs/use-components-alone