mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-23 14:06:59 +02:00
feat: allow using pure HTML as label in navbar links (#7079)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
529d853ab8
commit
bfbc78e52a
5 changed files with 63 additions and 27 deletions
|
@ -49,8 +49,10 @@ const NavbarItemPosition = Joi.string().equal('left', 'right').default('left');
|
|||
|
||||
const NavbarItemBaseSchema = Joi.object({
|
||||
label: Joi.string(),
|
||||
html: Joi.string(),
|
||||
className: Joi.string(),
|
||||
})
|
||||
.nand('html', 'label')
|
||||
// We allow any unknown attributes on the links (users may need additional
|
||||
// attributes like target, aria-role, data-customAttribute...)
|
||||
.unknown();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue