tikit
Version:
A collection of ready-made components for Titanium Apps
24 lines (19 loc) • 1.59 kB
text/xml
<Alloy>
<TikitCode module="tikit.ui" component="code" copy="$.args.copy" close="$.args.close" classes="$.args.classes" class="w-11/12 h-auto rounded-lg border-1 border-{color}/90 bg-{color}/90">
<TextArea id="text" value="$.args.text" class="w-screen h-auto font-mono text-sm bg-transparent scrollable-false ios:px-3 ios:pb-4 ios:pt-12 android:pt-20 android:px-8 android:border-style-none text-{text}/80 editable-false enable-copy-false touch-enabled-false" />
<View class="w-screen h-8 mt-0 rounded-t-lg bg-{color}/50">
<View if="$.args.close" btn="close" class="horizontal ml-2">
<View class="rounded-3 touch-enabled-false mr-1 h-3 w-3 bg-red-500" />
<View class="rounded-3 touch-enabled-false mx-0.5 h-3 w-3 bg-yellow-500" />
<View class="rounded-3 touch-enabled-false ml-1 h-3 w-3 bg-green-500" />
</View>
<View if="!$.args.close" class="horizontal touch-enabled-false ml-2">
<View class="w-3 h-3 mr-1 rounded-3 bg-{text}/50 touch-enabled-false" />
<View class="w-3 h-3 mx-0.5 rounded-3 bg-{text}/50 touch-enabled-false" />
<View class="w-3 h-3 ml-1 rounded-3 bg-{text}/50 touch-enabled-false" />
</View>
<Label id="title" text="$.args.title" class="h-auto ml-16 mr-16 text-sm font-bold mt-1.5 text-{text}/80 touch-enabled-false" />
<Button id="copy" if="$.args.copy" btn="copy" class="w-16 h-8 mt-0 mr-0 text-xs text-center font-regular android:touch-feedback text-{text}/80 rounded-tr-3 bg-{color}/80" title="L('copy', 'Copy')" value="$.args.text" />
</View>
</TikitCode>
</Alloy>