UNPKG

@blackbaud/skyux

Version:
27 lines 1.94 kB
import { Component, EventEmitter, Input, Output } from '@angular/core'; var SkyChevronComponent = (function () { function SkyChevronComponent() { this.directionChange = new EventEmitter(); this.direction = 'up'; } SkyChevronComponent.prototype.chevronClick = function () { this.direction = this.direction === 'up' ? 'down' : 'up'; this.directionChange.emit(this.direction); }; return SkyChevronComponent; }()); export { SkyChevronComponent }; SkyChevronComponent.decorators = [ { type: Component, args: [{ selector: 'sky-chevron', styles: [".sky-chevron{border:none;background-color:transparent;flex-shrink:0;height:24px;margin:0;overflow:hidden;padding:0;width:24px}.sky-chevron-part{border-color:#d1dade;border-style:solid;border-width:3px 0 0 0;display:inline-block;height:10px;position:relative;top:6px;transition:transform 250ms,left 250ms;vertical-align:top;width:10px}.sky-chevron-up .sky-chevron-left{left:7px;transform:rotate(-45deg)}.sky-chevron-up .sky-chevron-right{left:-6px;transform:rotate(45deg)}.sky-chevron-down .sky-chevron-left{left:2px;transform:rotate(45deg)}.sky-chevron-down .sky-chevron-right{left:-1px;transform:rotate(-45deg)}\n"], template: "<button\n type=\"button\"\n class=\"sky-chevron\"\n [ngClass]=\"['sky-chevron-' + direction]\"\n (click)=\"$event.stopPropagation();chevronClick()\"\n [attr.aria-label]=\"(direction === 'down' ? 'chevron_expand' : 'chevron_collapse') | skyResources\"\n>\n <i class=\"sky-chevron-part sky-chevron-left\"></i>\n <i class=\"sky-chevron-part sky-chevron-right\"></i>\n</button>\n" },] }, ]; /** @nocollapse */ SkyChevronComponent.ctorParameters = function () { return []; }; SkyChevronComponent.propDecorators = { 'directionChange': [{ type: Output },], 'direction': [{ type: Input },], }; //# sourceMappingURL=chevron.component.js.map