Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { Component, h, getMode } from '@stencil/core';
/**
* @virtualProp {string} colormode - The mode determines which platform styles to use.
*/
@Component({
tag: 'shadow-dom-mode',
styleUrls: {
blue: 'mode-blue.css',
red: 'mode-red.css'
},
shadow: true
})
export class ShadowDomMode {
private mode = getMode(this);
render() {
return <div>{this.mode}</div>;
}
}
export const getIonMode = (ref?: any): Mode => {
return (ref && getMode(ref)) || defaultMode;
};
export function getIonMode(ref) {
return (ref && getMode(ref)) || mode;
}
export default function () {