Files
ionic-framework/core/src/components/avatar/avatar.tsx

32 lines
669 B
TypeScript

import type { ComponentInterface } from '@stencil/core';
import { Component, Host, h } from '@stencil/core';
import { getIonTheme } from '../../global/ionic-global';
/**
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the appearance of components.
*/
@Component({
tag: 'ion-avatar',
styleUrls: {
ios: 'avatar.ios.scss',
md: 'avatar.md.scss',
ionic: 'avatar.md.scss',
},
shadow: true,
})
export class Avatar implements ComponentInterface {
render() {
const theme = getIonTheme(this);
return (
<Host
class={{
[theme]: true,
}}
>
<slot></slot>
</Host>
);
}
}