feat(TextField): support css white-space and text-overflow (#10737)

This commit is contained in:
Nathan Walker
2025-06-23 21:54:41 -05:00
committed by GitHub
parent 8979ad8f64
commit ac2e6a0928
6 changed files with 52 additions and 12 deletions

View File

@@ -260,4 +260,10 @@ Button {
.no-shadow {
box-shadow: none;
}
.truncate {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

View File

@@ -24,6 +24,10 @@
<TextView hint="Type text..." style.placeholderColor="silver" textChange="{{textChangeArea}}" color="black" width="80%" borderColor="silver" borderWidth="1" height="200" borderRadius="4" fontSize="14">
</TextView>
<Label text="TextField white-space + text-overflow" fontWeight="bold" marginTop="12" />
<TextField text="https://a.very.long.url.that.needs.to.be.truncated.com/" class="truncate" marginTop="6" backgroundColor="#efefef" padding="8" fontSize="18" height="60">
</TextField>
</StackLayout>
</ScrollView>
</Page>