typography.js 3.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. var __extends = (this && this.__extends) || (function () {
  2. var extendStatics = Object.setPrototypeOf ||
  3. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  4. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  5. return function (d, b) {
  6. extendStatics(d, b);
  7. function __() { this.constructor = d; }
  8. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  9. };
  10. })();
  11. (function (factory) {
  12. if (typeof module === "object" && typeof module.exports === "object") {
  13. var v = factory(require, exports);
  14. if (v !== undefined) module.exports = v;
  15. }
  16. else if (typeof define === "function" && define.amd) {
  17. define(["require", "exports", "@angular/core", "../../config/config", "../ion"], factory);
  18. }
  19. })(function (require, exports) {
  20. "use strict";
  21. Object.defineProperty(exports, "__esModule", { value: true });
  22. var core_1 = require("@angular/core");
  23. var config_1 = require("../../config/config");
  24. var ion_1 = require("../ion");
  25. /**
  26. * @name Typography
  27. * @module ionic
  28. * @description
  29. *
  30. * The Typography component is a simple component that can be used to style the text color of any element.
  31. * The `ion-text` attribute should be added to the element in order to pass a color from the Sass `$colors`
  32. * map and change the text color of that element.
  33. *
  34. * @usage
  35. *
  36. * ```html
  37. * <h1 ion-text color="secondary">H1: The quick brown fox jumps over the lazy dog</h1>
  38. *
  39. * <h2 ion-text color="primary">H2: The quick brown fox jumps over the lazy dog</h2>
  40. *
  41. * <h3 ion-text color="light">H3: The quick brown fox jumps over the lazy dog</h3>
  42. *
  43. * <h4 ion-text color="danger">H4: The quick brown fox jumps over the lazy dog</h4>
  44. *
  45. * <h5 ion-text color="dark">H5: The quick brown fox jumps over the lazy dog</h5>
  46. *
  47. * <h6 ion-text [color]="dynamicColor">H6: The quick brown fox jumps over the lazy dog</h6>
  48. *
  49. * <p>
  50. * I saw a werewolf with a Chinese menu in his hand.
  51. * Walking through the <sub ion-text color="danger">streets</sub> of Soho in the rain.
  52. * He <i ion-text color="primary">was</i> looking for a place called Lee Ho Fook's.
  53. * Gonna get a <a ion-text color="secondary">big dish of beef chow mein.</a>
  54. * </p>
  55. *
  56. * <p>
  57. * He's the hairy-handed gent who ran amuck in Kent.
  58. * Lately he's <sup ion-text color="primary">been</sup> overheard in Mayfair.
  59. * Better stay away from him.
  60. * He'll rip your lungs out, Jim.
  61. * I'd like to meet his tailor.
  62. * </p>
  63. * ```
  64. *
  65. */
  66. var Typography = (function (_super) {
  67. __extends(Typography, _super);
  68. function Typography(config, elementRef, renderer) {
  69. return _super.call(this, config, elementRef, renderer, 'text') || this;
  70. }
  71. Typography.decorators = [
  72. { type: core_1.Directive, args: [{
  73. selector: '[ion-text]'
  74. },] },
  75. ];
  76. /** @nocollapse */
  77. Typography.ctorParameters = function () { return [
  78. { type: config_1.Config, },
  79. { type: core_1.ElementRef, },
  80. { type: core_1.Renderer, },
  81. ]; };
  82. return Typography;
  83. }(ion_1.Ion));
  84. exports.Typography = Typography;
  85. });
  86. //# sourceMappingURL=typography.js.map