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

Method render

core/src/components/fab-button/fab-button.tsx:153–209  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

151 }
152
153 render() {
154 const { el, disabled, color, href, activated, show, translucent, size, inheritedAttributes } = this;
155 const inList = hostContext('ion-fab-list', el);
156 const mode = getIonMode(this);
157 const TagType = href === undefined ? 'button' : ('a' as any);
158 const attrs =
159 TagType === 'button'
160 ? { type: this.type }
161 : {
162 download: this.download,
163 href,
164 rel: this.rel,
165 target: this.target,
166 };
167
168 return (
169 <Host
170 onClick={this.onClick}
171 aria-disabled={disabled ? 'true' : null}
172 class={createColorClasses(color, {
173 [mode]: true,
174 'fab-button-in-list': inList,
175 'fab-button-translucent-in-list': inList && translucent,
176 'fab-button-close-active': activated,
177 'fab-button-show': show,
178 'fab-button-disabled': disabled,
179 'fab-button-translucent': translucent,
180 'ion-activatable': true,
181 'ion-focusable': true,
182 [`fab-button-${size}`]: size !== undefined,
183 })}
184 >
185 <TagType
186 {...attrs}
187 class="button-native"
188 part="native"
189 disabled={disabled}
190 onFocus={this.onFocus}
191 onBlur={this.onBlur}
192 onClick={(ev: Event) => openURL(href, ev, this.routerDirection, this.routerAnimation)}
193 {...inheritedAttributes}
194 >
195 <ion-icon
196 aria-hidden="true"
197 icon={this.closeIcon}
198 part="close-icon"
199 class="close-icon"
200 lazy={false}
201 ></ion-icon>
202 <span class="button-inner">
203 <slot></slot>
204 </span>
205 {mode === 'md' && <ion-ripple-effect></ion-ripple-effect>}
206 </TagType>
207 </Host>
208 );
209 }
210}

Callers

nothing calls this directly

Calls 4

hostContextFunction · 0.90
getIonModeFunction · 0.90
createColorClassesFunction · 0.90
openURLFunction · 0.90

Tested by

no test coverage detected