Skip to content

Commit

Permalink
Update value format
Browse files Browse the repository at this point in the history
  • Loading branch information
ludovic35 committed Jan 10, 2025
1 parent 8c68289 commit 72a0a4a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Showcase/Showcase/Pages/Tokens/Border/BorderTokenPage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ struct BorderTokenPage: View {
var body: some View {
let token = namedWidth.token(from: theme)
let name = namedWidth.rawValue
let value = String(format: "(%.0f) pt", token)
let value = String(format: "%.0f pt", token)

ShowcaseTokenIllustration(tokenName: name, tokenValue: value) {
RectangleBackground()
Expand All @@ -110,7 +110,7 @@ struct BorderTokenPage: View {
var body: some View {
let token = namedRadius.token(from: theme)
let name = namedRadius.rawValue
let value = String(format: "(%.0f) pt", token)
let value = String(format: "%.0f pt", token)

ShowcaseTokenIllustration(tokenName: name, tokenValue: value) {
RectangleBackground()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct SizeTokenPage: View {
var body: some View {
let token = namedSize.token(from: theme)
let name = namedSize.rawValue
let value = String(format: "(%.0f) pt", token)
let value = String(format: "%.0f pt", token)

ShowcaseTokenIllustration(tokenName: name, tokenValue: value) {
ZStack {
Expand Down Expand Up @@ -86,7 +86,7 @@ struct SizeTokenPage: View {
var body: some View {
let token = namedSize.token(fot: theme, userInterfaceSizeClass: horizontalSizeClass ?? .regular)
let namedFont = namedSize.namedFont
let value = String(format: "\(namedSize.rawValue) (%.0f) pt", token)
let value = String(format: "\(namedSize.rawValue) (%.0f pt)", token)

HStack {
Image("ic_token")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct SpaceTokenVariant<TokenIllustration>: View where TokenIllustration: View
var body: some View {
let token = namedSpaceToken.token(from: theme)
let name = namedSpaceToken.name
let value = String(format: "%.2f (pt)", token)
let value = String(format: "%.2f pt", token)

return ShowcaseTokenIllustration(tokenName: name, tokenValue: value) {
illustration(token)
Expand Down
2 changes: 1 addition & 1 deletion Showcase/Showcase/Pages/Tokens/Grid/GrisTokenPage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ struct GridTokenPage: View {
private func illustration(for namedGrid: NamedGrid) -> some View {
let token = namedGrid.token(from: theme, for: horizontalSizeClass)
let name = namedGrid.rawValue
let value = String(format: "(%.0f) pt", token)
let value = String(format: "%.0f pt", token)

return ShowcaseTokenIllustration(tokenName: name, tokenValue: value) {
EmptyView()
Expand Down

0 comments on commit 72a0a4a

Please sign in to comment.