-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5aa1054
commit 2fd0bbf
Showing
4 changed files
with
56 additions
and
2 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
48 changes: 48 additions & 0 deletions
48
core/src/main/java/com/orange/ouds/core/component/samples/OudsButtonSamples.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,48 @@ | ||
/* | ||
* 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.core.component.samples | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.res.painterResource | ||
import com.orange.ouds.core.component.button.OudsButton | ||
|
||
@Composable | ||
fun OudsButtonWithTextSample() { | ||
OudsButton( | ||
text = "Text", | ||
onClick = { /* Do something! */ } | ||
) | ||
} | ||
|
||
@Composable | ||
fun OudsButtonWithIconSample() { | ||
OudsButton( | ||
icon = OudsButton.Icon( | ||
painterResource(id = android.R.drawable.star_on), | ||
"Icon content description" | ||
), | ||
onClick = { /* Do something! */ } | ||
) | ||
} | ||
|
||
@Composable | ||
fun OudsButtonWithIconAndTextSample() { | ||
OudsButton( | ||
icon = OudsButton.Icon( | ||
painterResource(id = android.R.drawable.star_on), | ||
"Icon content description" | ||
), | ||
text = "Text", | ||
onClick = { /* Do something! */ } | ||
) | ||
} |
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