-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**Background** We are now moving to a new design system. The first step is to migrate the design system **Changes** - Made a palette generator from a JSON file with Figma (https://github.com/LionZXY/FlipperPalletGenerator) - Add LocalPalletV2 provider **Test plan** Try assemble and launch app
- Loading branch information
Showing
9 changed files
with
4,162 additions
and
23 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
24 changes: 24 additions & 0 deletions
24
...main/kotlin/com/flipperdevices/core/ui/theme/composable/pallet/FlipperPalletV2Provider.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,24 @@ | ||
package com.flipperdevices.core.ui.theme.composable.pallet | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.remember | ||
import com.flipperdevices.core.ui.theme.composable.pallet.generated.FlipperPalletV2 | ||
import com.flipperdevices.core.ui.theme.composable.pallet.generated.getDarkPallet | ||
import com.flipperdevices.core.ui.theme.composable.pallet.generated.getLightPallet | ||
import com.flipperdevices.core.ui.theme.composable.pallet.generated.toAnimatePallet | ||
|
||
/** | ||
* Please, use instead LocalPalletV2 | ||
* | ||
* @return the necessary Pallet depending on the theme | ||
*/ | ||
@Composable | ||
fun getThemedFlipperPalletV2(isLight: Boolean): FlipperPalletV2 { | ||
return remember(isLight) { | ||
if (isLight) { | ||
getLightPallet() | ||
} else { | ||
getDarkPallet() | ||
} | ||
}.toAnimatePallet() | ||
} |
Oops, something went wrong.