/
githubmirror
/
ionic
Обзор
Документация
Войти
/
githubmirror
/
ionic
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
core/src/components/grid/grid.tsx
30 строк
630 B
Liam DeBeasi
lint(eslint): migrate to eslint and prettier (#25046)
04 апр 2022, 18:12
Не верифицирован
04 апр 2022, 18:12
5676bab
Код
Авторство
О чём код?
import type { ComponentInterface } from '@stencil/core'; import { Component, Host, Prop, h } from '@stencil/core'; import { getIonMode } from '../../global/ionic-global'; @Component({ tag: 'ion-grid', styleUrl: 'grid.scss', shadow: true, }) export class Grid implements ComponentInterface { /** * If `true`, the grid will have a fixed width based on the screen size. */ @Prop() fixed = false; render() { const mode = getIonMode(this); return ( <Host class={{ [mode]: true, 'grid-fixed': this.fixed, }} > <slot></slot> </Host> ); } }