-
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from halilozercan/halilozercan/dematerialize
Remove Material dependency from richtext-ui Bump versions; - Compose 1.0.1 - Kotlin 1.5.21
- Loading branch information
Showing
34 changed files
with
569 additions
and
226 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Richtext UI Material | ||
|
||
Library that makes RichText compatible with Material design in Compose. | ||
|
||
## Gradle | ||
|
||
```groovy | ||
dependencies { | ||
implementation "com.halilibo.compose-richtext:richtext-ui-material:${richtext_version}" | ||
} | ||
``` | ||
|
||
## Usage | ||
|
||
`RichText` composable already wraps around `BasicRichText` by using appropriate Material | ||
attributes. You can quickly start by calling `RichText` without any further setup. | ||
|
||
```kotlin | ||
RichText(modifier = Modifier.background(color = Color.White)) { | ||
Heading(0, "Paragraphs") | ||
Text("Simple paragraph.") | ||
Text("Paragraph with\nmultiple lines.") | ||
Text("Paragraph with really long line that should be getting wrapped.") | ||
|
||
Heading(0, "Lists") | ||
Heading(1, "Unordered") | ||
ListDemo(listType = Unordered) | ||
Heading(1, "Ordered") | ||
ListDemo(listType = Ordered) | ||
|
||
Heading(0, "Horizontal Line") | ||
Text("Above line") | ||
HorizontalRule() | ||
Text("Below line") | ||
|
||
Heading(0, "Code Block") | ||
CodeBlock( | ||
""" | ||
{ | ||
"Hello": "world!" | ||
} | ||
""".trimIndent() | ||
) | ||
|
||
Heading(0, "Block Quote") | ||
BlockQuote { | ||
Text("These paragraphs are quoted.") | ||
Text("More text.") | ||
BlockQuote { | ||
Text("Nested block quote.") | ||
} | ||
} | ||
|
||
Heading(0, "Table") | ||
Table(headerRow = { | ||
cell { Text("Column 1") } | ||
cell { Text("Column 2") } | ||
}) { | ||
row { | ||
cell { Text("Hello") } | ||
cell { | ||
CodeBlock("Foo bar") | ||
} | ||
} | ||
row { | ||
cell { | ||
BlockQuote { | ||
Text("Stuff") | ||
} | ||
} | ||
cell { Text("Hello world this is a really long line that is going to wrap hopefully") } | ||
} | ||
} | ||
} | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
public final class com/zachklipp/richtext/ui/material/BuildConfig { | ||
public static final field BUILD_TYPE Ljava/lang/String; | ||
public static final field DEBUG Z | ||
public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; | ||
public fun <init> ()V | ||
} | ||
|
||
public final class com/zachklipp/richtext/ui/material/ComposableSingletons$RichTextKt { | ||
public static final field INSTANCE Lcom/zachklipp/richtext/ui/material/ComposableSingletons$RichTextKt; | ||
public static field lambda-1 Lkotlin/jvm/functions/Function4; | ||
public static field lambda-2 Lkotlin/jvm/functions/Function4; | ||
public fun <init> ()V | ||
public final fun getLambda-1$richtext_ui_material_release ()Lkotlin/jvm/functions/Function4; | ||
public final fun getLambda-2$richtext_ui_material_release ()Lkotlin/jvm/functions/Function4; | ||
} | ||
|
||
public final class com/zachklipp/richtext/ui/material/RichTextKt { | ||
public static final fun RichText (Landroidx/compose/ui/Modifier;Lcom/zachklipp/richtext/ui/RichTextStyle;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V | ||
} | ||
|
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,16 @@ | ||
plugins { | ||
id('org.jetbrains.dokka') | ||
} | ||
|
||
apply plugin: 'com.android.library' | ||
apply plugin: 'kotlin-android' | ||
apply from: rootProject.file('gradle/maven-publish.gradle') | ||
|
||
android rootProject.ext.defaultAndroidConfig | ||
|
||
dependencies { | ||
compileOnly deps.compose.tooling | ||
|
||
api project(":richtext-ui") | ||
implementation deps.compose.material | ||
} |
Empty file.
Oops, something went wrong.