-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
refactor: fix some design issues and mutualize some UI elements in de…
- ci/4842690
- ci/2722228
- ci/877496d
- ci/840586c
- ci/04178ba
- ci/3965c27
- ci/02741a7
- ci/822f506
- ci/774ca58
- ci/612c08c
- ci/90e7181
- ci/87d1526
- ci/73f2744
- ci/38ae3eb
- ci/22e215e
- ci/16cb92a
- ci/15c987c
- ci/012b9f6
- ci/09b2e4a
- ci/9aa2d12
- ci/8f5e274
- ci/8dee4a2
- ci/8d768bd
- ci/7c5f492
- ci/6d24653
- ci/5f71690
- ci/5bd516b
- ci/4baef6c
- ci/4a3369f
- ci/3f2f0fd
- ci/3ef7c7d
- ci/3db0aaa
- ci/2c79e5a
- ci/1ebf090
- ci/1e3838c
- ci/0cdcbf2
- ci/0a7647f
- ci/0a83c43
- ci/fd61036
- ci/f139359
- ci/f9e7bda
- ci/e066257
- ci/e824a57
- ci/e185ac2
- ci/e31d3b8
- ci/dc6e0bf
- ci/db5a45f
- ci/d4238e7
- ci/cc26215
- ci/c144182
- ci/c9699bc
- ci/c623f60
- ci/c9c2349
- ci/bfd6e46
- ci/bc62307
- ci/bc38100
- ci/b9366bf
- ci/b945e46
- ci/b0d8224
- ci/ae640ba
- ci/a9f2231
- ci/a07cf4b
- ci/a01f928
- Test_Flight/4842690
- Test_Flight/2722228
- Test_Flight/877496d
- Test_Flight/840586c
- Test_Flight/04178ba
- Test_Flight/3965c27
- Test_Flight/02741a7
- Test_Flight/822f506
- Test_Flight/774ca58
- Test_Flight/612c08c
- Test_Flight/90e7181
- Test_Flight/87d1526
- Test_Flight/73f2744
- Test_Flight/38ae3eb
- Test_Flight/22e215e
- Test_Flight/16cb92a
- Test_Flight/15c987c
- Test_Flight/012b9f6
- Test_Flight/09b2e4a
- Test_Flight/9aa2d12
- Test_Flight/8f5e274
- Test_Flight/8dee4a2
- Test_Flight/8d768bd
- Test_Flight/7c5f492
- Test_Flight/6d24653
- Test_Flight/5f71690
- Test_Flight/5bd516b
- Test_Flight/4baef6c
- Test_Flight/4a3369f
- Test_Flight/3f2f0fd
- Test_Flight/3ef7c7d
- Test_Flight/3db0aaa
- Test_Flight/2c79e5a
- Test_Flight/1ebf090
- Test_Flight/1e3838c
- Test_Flight/0cdcbf2
- Test_Flight/0a7647f
- Test_Flight/0a83c43
- Test_Flight/fd61036
- Test_Flight/f139359
- Test_Flight/f9e7bda
- Test_Flight/e066257
- Test_Flight/e824a57
- Test_Flight/e185ac2
- Test_Flight/e31d3b8
- Test_Flight/dc6e0bf
- Test_Flight/db5a45f
- Test_Flight/d4238e7
- Test_Flight/cc26215
- Test_Flight/c144182
- Test_Flight/c9699bc
- Test_Flight/c623f60
- Test_Flight/c9c2349
- Test_Flight/bfd6e46
- Test_Flight/bc62307
- Test_Flight/bc38100
- Test_Flight/b9366bf
- Test_Flight/b945e46
- Test_Flight/b0d8224
- Test_Flight/ae640ba
- Test_Flight/a9f2231
- Test_Flight/a07cf4b
- Test_Flight/a01f928
- 0.11.0
- 0.11.0-rc5
- 0.11.0-rc4
- 0.11.0-rc3
- 0.11.0-rc2
- 0.11.0-rc1
- 0.10.0
- 0.10.0-rc3
- 0.10.0-rc2
- 0.10.0-rc1
- 0.9.0
- 0.9.0-rc1
- 0.8.0
- 0.8.0-rc3
- 0.8.0-rc2
- 0.8.0-rc1
- 0.7.0
- 0.7.0-rc4
- 0.7.0-rc3
- 0.7.0-rc2
- 0.7.0-rc1
- 0.6.0
- 0.6.0-rc4
- 0.6.0-rc3
- 0.6.0-rc2
- 0.6.0-rc1
- 0.5.0
- 0.5.0-rc7
- 0.5.0-rc6
- 0.5.0-rc5
- 0.5.0-rc4
- 0.5.0-rc3
- 0.5.0-rc2
- 0.5.0-rc1
- 0.4.1
- 0.4.0
- 0.4.0-rc4
- 0.4.0-rc3
- 0.4.0-rc2
- 0.4.0-rc1
Showing
11 changed files
with
210 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
Showcase/Showcase/Pages/Utils/ShowcaseTokenIllustration.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// | ||
// Software Name: OUDS iOS | ||
// SPDX-FileCopyrightText: Copyright (c) Orange SA | ||
// SPDX-License-Identifier: MIT | ||
// | ||
// This software is distributed under the MIT license, | ||
// the text of which is available at https://opensource.org/license/MIT/ | ||
// or see the "LICENSE" file for more details. | ||
// | ||
// Authors: See CONTRIBUTORS.txt | ||
// Software description: A SwiftUI components library with code examples for Orange Unified Design System | ||
// | ||
|
||
import SwiftUI | ||
import OUDS | ||
import OUDSTokensSemantic | ||
|
||
struct ShowcaseTokenIllustration<TokenIllustration>: View where TokenIllustration: View { | ||
|
||
@Environment(\.theme) private var theme | ||
@Environment(\.colorScheme) private var colorScheme | ||
|
||
// MARK: Stored properties | ||
|
||
@ViewBuilder | ||
let tokenIllustration: () -> TokenIllustration | ||
let tokenName: String | ||
let tokenValue: String? | ||
|
||
// MARK: Initializer | ||
|
||
init(tokenName: String, tokenValue: String? = nil, tokenIllustration: @escaping () -> TokenIllustration) { | ||
self.tokenIllustration = tokenIllustration | ||
self.tokenName = tokenName | ||
self.tokenValue = tokenValue | ||
} | ||
|
||
// MARK: Body | ||
|
||
var body: some View { | ||
HStack(alignment: .top, spacing: theme.spaceFixedMedium) { | ||
|
||
tokenIllustration() | ||
|
||
VStack(alignment: .leading) { | ||
Text(tokenName) | ||
.typeBodyStrongLarge(theme) | ||
.foregroundStyle((theme.colorContentDefault?.color(for: colorScheme))!) | ||
if let tokenValue { | ||
Text(tokenValue) | ||
.typeBodyDefaultMedium(theme) | ||
.foregroundStyle((theme.colorContentMuted?.color(for: colorScheme))!) | ||
} | ||
} | ||
.frame(maxWidth: .infinity, alignment: .leading) | ||
} | ||
.padding(.vertical, theme.spaceFixedShorter) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters