MCPcopy Create free account
hub / github.com/codeaashu/claude-code / Text

Function Text

src/ink/components/Text.tsx:114–253  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

112 * This component can display text, and change its style to make it colorful, bold, underline, italic or strikethrough.
113 */
114export default function Text(t0) {
115 const $ = _c(29);
116 const {
117 color,
118 backgroundColor,
119 bold,
120 dim,
121 italic: t1,
122 underline: t2,
123 strikethrough: t3,
124 inverse: t4,
125 wrap: t5,
126 children
127 } = t0;
128 const italic = t1 === undefined ? false : t1;
129 const underline = t2 === undefined ? false : t2;
130 const strikethrough = t3 === undefined ? false : t3;
131 const inverse = t4 === undefined ? false : t4;
132 const wrap = t5 === undefined ? "wrap" : t5;
133 if (children === undefined || children === null) {
134 return null;
135 }
136 let t6;
137 if ($[0] !== color) {
138 t6 = color && {
139 color
140 };
141 $[0] = color;
142 $[1] = t6;
143 } else {
144 t6 = $[1];
145 }
146 let t7;
147 if ($[2] !== backgroundColor) {
148 t7 = backgroundColor && {
149 backgroundColor
150 };
151 $[2] = backgroundColor;
152 $[3] = t7;
153 } else {
154 t7 = $[3];
155 }
156 let t8;
157 if ($[4] !== dim) {
158 t8 = dim && {
159 dim
160 };
161 $[4] = dim;
162 $[5] = t8;
163 } else {
164 t8 = $[5];
165 }
166 let t9;
167 if ($[6] !== bold) {
168 t9 = bold && {
169 bold
170 };
171 $[6] = bold;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected