-
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.
Add code snippet for OudsButton and OudsLink
- Loading branch information
1 parent
4af6366
commit ed5e392
Showing
3 changed files
with
117 additions
and
3 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
app/src/main/java/com/orange/ouds/app/ui/components/ComponentCode.kt
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,28 @@ | ||
/* | ||
* Software Name: OUDS Android | ||
* 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. | ||
* | ||
* Software description: Android library of reusable graphical components | ||
*/ | ||
|
||
package com.orange.ouds.app.ui.components | ||
|
||
import com.orange.ouds.app.ui.utilities.Code | ||
import com.orange.ouds.core.component.OudsColoredBox | ||
|
||
fun Code.Builder.coloredBoxCall(onColoredBox: Boolean, content: Code.Builder.() -> Unit) { | ||
if (onColoredBox) { | ||
functionCall("OudsColoredBox") { | ||
trailingLambda = true | ||
typedArgument("color", OudsColoredBox.Color.BrandPrimary) | ||
lambdaArgument("content", content) | ||
} | ||
} else { | ||
content() | ||
} | ||
} |
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