mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-21 04:57:05 +02:00
feat(theme-classic): allow specifying width/height in logo (#5770)
* feat: changed the logo properties to allow width/height specification * fixup! feat: changed the logo properties to allow width/height specification * fixup! feat: changed the logo properties to allow width/height specification * Rework: add fields to logo object * Fix * More fixes * Wrong width! * No need for optional chaining * Doc writeup Co-authored-by: Josh-Cena <sidachen2003@gmail.com>
This commit is contained in:
parent
895c848065
commit
41ef9daafd
8 changed files with 66 additions and 4 deletions
|
@ -345,6 +345,27 @@ describe('themeConfig', () => {
|
|||
});
|
||||
});
|
||||
|
||||
test('should allow width and height specification for logo ', () => {
|
||||
const altTagConfig = {
|
||||
navbar: {
|
||||
logo: {
|
||||
alt: '',
|
||||
src: '/arbitrary-logo.png',
|
||||
srcDark: '/arbitrary-dark-logo.png',
|
||||
width: '20px',
|
||||
height: '20%',
|
||||
},
|
||||
},
|
||||
};
|
||||
expect(testValidateThemeConfig(altTagConfig)).toEqual({
|
||||
...DEFAULT_CONFIG,
|
||||
navbar: {
|
||||
...DEFAULT_CONFIG.navbar,
|
||||
...altTagConfig.navbar,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
test('should accept valid prism config', () => {
|
||||
const prismConfig = {
|
||||
prism: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue