feat: allow using pure HTML as label in navbar links (#7079)

Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
Alexey Pyltsyn 2022-04-07 13:33:52 +03:00 committed by GitHub
parent 529d853ab8
commit bfbc78e52a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 63 additions and 27 deletions

View file

@ -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();