-
-
Notifications
You must be signed in to change notification settings - Fork 310
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
[PageContainer] Add a few extra slots or allow complete override of title #4511
Comments
I think we could add a single slot that replaces the whole title, and call it |
Could we also allow the user to add an href or segment to link to somewhere else than just "/" ? |
This is being worked on here: #4477 |
Does the new |
Hello, sorry for the late response but I do not have much spare time. @bharatkashyap yes, something like this but for |
Summary
PageContainer
could use a few extra slots:preTitle
: an element that is placed immediately before theh#
element that contains thetitle
postTitle
: an element that is placed immediately after theh#
element that contains thetitle
.preTitle
,title
,postTitle
should wrap into new rows in smaller widthsThese should be siblings to the
h#
, not childrenAn alternative approach would be to allow a
ReactNode
for thetitle
prop (or turn it into a slot?), in which case it's up to the user to implement the HTML structure correctly, and thePageContainer
simply renders it in place of where it's currently rendering<h#>{title}</h#>
, completely replacing this with whatever the user passed astitle
.If a
string
is passed astitle
then it works like it does now.Examples
e.g.
I need to add an icon before the title and some extra information after it.
Motivation
Needing to achieve something like this:
Search keywords: PageContainer, title, customization
The text was updated successfully, but these errors were encountered: