/
githubmirror
/
ionic-framework
Обзор
Документация
Войти
/
githubmirror
/
ionic-framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
core/src/components/buttons/buttons.tsx
42 строки
1 KB
Ryan Waskiewicz
refactor(config): enable stencil's experimental slot fixes (#28995)
12 мар 2024, 23:08
Не верифицирован
12 мар 2024, 23:08
5cf84ee
Код
Авторство
О чём код?
import type { ComponentInterface } from '@stencil/core'; import { Component, Host, Prop, h } from '@stencil/core'; import { getIonMode } from '../../global/ionic-global'; @Component({ tag: 'ion-buttons', styleUrls: { ios: 'buttons.ios.scss', md: 'buttons.md.scss', }, scoped: true, }) export class Buttons implements ComponentInterface { /** * If true, buttons will disappear when its * parent toolbar has fully collapsed if the toolbar * is not the first toolbar. If the toolbar is the * first toolbar, the buttons will be hidden and will * only be shown once all toolbars have fully collapsed. * * Only applies in `ios` mode with `collapse` set to * `true` on `ion-header`. * * Typically used for [Collapsible Large Titles](https://ionicframework.com/docs/api/title#collapsible-large-titles) */ @Prop() collapse = false; render() { const mode = getIonMode(this); return ( <Host class={{ [mode]: true, ['buttons-collapse']: this.collapse, }} > <slot></slot> </Host> ); } }