File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
packages/decap-cms-core/src/components/App Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,7 @@ class App extends React.Component {
183183 openMediaLibrary = { openMediaLibrary }
184184 hasWorkflow = { hasWorkflow }
185185 displayUrl = { config . display_url }
186+ logoUrl = { config . logo_url }
186187 isTestRepo = { config . backend . name === 'test-repo' }
187188 showMediaButton = { showMediaButton }
188189 />
Original file line number Diff line number Diff line change @@ -114,6 +114,19 @@ const AppHeaderNavList = styled.ul`
114114 list-style: none;
115115` ;
116116
117+ const AppHeaderLogo = styled . li `
118+ display: flex;
119+ align-items: center;
120+
121+ img {
122+ padding: 12px 20px;
123+ max-height: 56px;
124+ max-width: 300px;
125+ object-fit: contain;
126+ object-position: center;
127+ }
128+ ` ;
129+
117130class Header extends React . Component {
118131 static propTypes = {
119132 user : PropTypes . object . isRequired ,
@@ -123,6 +136,7 @@ class Header extends React.Component {
123136 openMediaLibrary : PropTypes . func . isRequired ,
124137 hasWorkflow : PropTypes . bool . isRequired ,
125138 displayUrl : PropTypes . string ,
139+ logoUrl : PropTypes . string ,
126140 isTestRepo : PropTypes . bool ,
127141 t : PropTypes . func . isRequired ,
128142 checkBackendStatus : PropTypes . func . isRequired ,
@@ -155,6 +169,7 @@ class Header extends React.Component {
155169 openMediaLibrary,
156170 hasWorkflow,
157171 displayUrl,
172+ logoUrl,
158173 isTestRepo,
159174 t,
160175 showMediaButton,
@@ -169,6 +184,9 @@ class Header extends React.Component {
169184 < AppHeaderContent >
170185 < nav >
171186 < AppHeaderNavList >
187+ { logoUrl && < AppHeaderLogo >
188+ < img src = { logoUrl } alt = "Logo" />
189+ </ AppHeaderLogo > }
172190 < li >
173191 < AppHeaderNavLink
174192 to = "/"
You can’t perform that action at this time.
0 commit comments