1/* 2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * Provide text decoration. 18 * @since 7 19 */ 20/** 21 * Provide text decoration. 22 * @form 23 * @since 9 24 */ 25interface SpanInterface { 26 /** 27 * Called when text is entered in span. 28 * @since 7 29 */ 30 /** 31 * Called when text is entered in span. 32 * @form 33 * @since 9 34 */ 35 (value: string | Resource): SpanAttribute; 36} 37 38/** 39 * @since 7 40 */ 41/** 42 * @form 43 * @since 9 44 */ 45declare class SpanAttribute extends CommonMethod<SpanAttribute> { 46 /** 47 * Called when the font color is set. 48 * @since 7 49 */ 50 /** 51 * Called when the font color is set. 52 * @form 53 * @since 9 54 */ 55 fontColor(value: ResourceColor): SpanAttribute; 56 57 /** 58 * Called when the font size is set. 59 * @since 7 60 */ 61 /** 62 * Called when the font size is set. 63 * @form 64 * @since 9 65 */ 66 fontSize(value: number | string | Resource): SpanAttribute; 67 68 /** 69 * Called when the font style of a font is set. 70 * @since 7 71 */ 72 /** 73 * Called when the font style of a font is set. 74 * @form 75 * @since 9 76 */ 77 fontStyle(value: FontStyle): SpanAttribute; 78 79 /** 80 * Called when the font weight is set. 81 * @since 7 82 */ 83 /** 84 * Called when the font weight is set. 85 * @form 86 * @since 9 87 */ 88 fontWeight(value: number | FontWeight | string): SpanAttribute; 89 90 /** 91 * Called when the font list of text is set. 92 * @since 7 93 */ 94 /** 95 * Called when the font list of text is set. 96 * @form 97 * @since 9 98 */ 99 fontFamily(value: string | Resource): SpanAttribute; 100 101 /** 102 * Called when the text decoration of the text is set. 103 * @since 7 104 */ 105 /** 106 * Called when the text decoration of the text is set. 107 * @form 108 * @since 9 109 */ 110 decoration(value: { type: TextDecorationType; color?: ResourceColor }): SpanAttribute; 111 112 /** 113 * Called when the distance between text fonts is set. 114 * @since 7 115 */ 116 /** 117 * Called when the distance between text fonts is set. 118 * @form 119 * @since 9 120 */ 121 letterSpacing(value: number | string): SpanAttribute; 122 123 /** 124 * Called when the type of letter in the text font is set. 125 */ 126 /** 127 * Called when the type of letter in the text font is set. 128 * @form 129 * @since 9 130 */ 131 textCase(value: TextCase): SpanAttribute; 132} 133 134/** 135 * Defines Span Component. 136 * @since 7 137 */ 138/** 139 * Defines Span Component. 140 * @form 141 * @since 9 142 */ 143declare const Span: SpanInterface; 144 145/** 146 * Defines Span Component instance. 147 * @since 7 148 */ 149/** 150 * Defines Span Component instance. 151 * @form 152 * @since 9 153 */ 154declare const SpanInstance: SpanAttribute; 155