mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 11:41:20 +08:00

* make requested changes * add e2e * add RTL support * fix typo * add info on how to make collapsable title * add usage examples * fix typo * fix another typo * fix typos * update usage * fix alpha order * update api * add class to collapse buttons * merge * update * change back to collapse * remove platform specific class * update docs * run build * update api again * run build
42 lines
1.0 KiB
TypeScript
42 lines
1.0 KiB
TypeScript
import { Component, ComponentInterface, 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
|
|
}}
|
|
>
|
|
</Host>
|
|
);
|
|
}
|
|
}
|