MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / render

Method render

core/src/components/header/header.tsx:208–236  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

206 }
207
208 render() {
209 const { translucent, inheritedAttributes } = this;
210 const mode = getIonMode(this);
211 const collapse = this.collapse || 'none';
212 const isCondensed = collapse === 'condense';
213
214 // banner role must be at top level, so remove role if inside a menu
215 const roleType = getRoleType(hostContext('ion-menu', this.el), isCondensed, mode);
216
217 return (
218 <Host
219 role={roleType}
220 class={{
221 [mode]: true,
222
223 // Used internally for styling
224 [`header-${mode}`]: true,
225
226 [`header-translucent`]: this.translucent,
227 [`header-collapse-${collapse}`]: true,
228 [`header-translucent-${mode}`]: this.translucent,
229 }}
230 {...inheritedAttributes}
231 >
232 {mode === 'ios' && translucent && <div class="header-background"></div>}
233 <slot></slot>
234 </Host>
235 );
236 }
237}

Callers

nothing calls this directly

Calls 3

getIonModeFunction · 0.90
getRoleTypeFunction · 0.90
hostContextFunction · 0.90

Tested by

no test coverage detected