@ionic/core
Version:
Base components for Ionic
85 lines (84 loc) • 3.44 kB
JavaScript
/*!
* (C) Ionic http://ionicframework.com - MIT License
*/
import { Host, h } from "@stencil/core";
import { createColorClasses } from "../../utils/theme";
import { getIonMode } from "../../global/ionic-global";
/**
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
*
* @part inner - The inner wrapper element that arranges the list header content.
*/
export class ListHeader {
render() {
const { lines } = this;
const mode = getIonMode(this);
return (h(Host, { key: '92ab17533e169b1a1c990285449e0546aac98021', class: createColorClasses(this.color, {
[mode]: true,
[`list-header-lines-${lines}`]: lines !== undefined,
}) }, h("div", { key: '26639255577380a8e70b61f753aa9ed57590694f', class: "list-header-inner", part: "inner" }, h("slot", { key: 'f69055e7a7a47ae8dcbbe289e18b6630f0792714' }))));
}
static get is() { return "ion-list-header"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() {
return {
"ios": ["list-header.ios.scss"],
"md": ["list-header.md.scss"]
};
}
static get styleUrls() {
return {
"ios": ["list-header.ios.css"],
"md": ["list-header.md.css"]
};
}
static get properties() {
return {
"color": {
"type": "string",
"mutable": false,
"complexType": {
"original": "Color",
"resolved": "\"danger\" | \"dark\" | \"light\" | \"medium\" | \"primary\" | \"secondary\" | \"success\" | \"tertiary\" | \"warning\" | string & Record<never, never> | undefined",
"references": {
"Color": {
"location": "import",
"path": "../../interface",
"id": "src/interface.d.ts::Color",
"referenceLocation": "Color"
}
}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\nFor more information on colors, see [theming](/docs/theming/basics)."
},
"getter": false,
"setter": false,
"reflect": true,
"attribute": "color"
},
"lines": {
"type": "string",
"mutable": false,
"complexType": {
"original": "'full' | 'inset' | 'none'",
"resolved": "\"full\" | \"inset\" | \"none\" | undefined",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "How the bottom border should be displayed on the list header."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "lines"
}
};
}
}