tachiyomi/app/src/main/java/eu/kanade/presentation/more/settings/widget/InfoWidget.kt
arkon 0d1bced122 Replace remaining Android-specific strings
Also renaming the helper composables so it's a bit easier to find/replace everything
in forks.
2023-11-18 19:41:33 -05:00

52 lines
1.6 KiB
Kotlin

package eu.kanade.presentation.more.settings.widget
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.Info
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.PreviewLightDark
import eu.kanade.presentation.theme.TachiyomiTheme
import tachiyomi.i18n.MR
import tachiyomi.presentation.core.components.material.padding
import tachiyomi.presentation.core.i18n.stringResource
import tachiyomi.presentation.core.util.secondaryItemAlpha
@Composable
internal fun InfoWidget(text: String) {
Column(
modifier = Modifier
.padding(
horizontal = PrefsHorizontalPadding,
vertical = MaterialTheme.padding.medium,
)
.secondaryItemAlpha(),
verticalArrangement = Arrangement.spacedBy(MaterialTheme.padding.medium),
) {
Icon(
imageVector = Icons.Outlined.Info,
contentDescription = null,
)
Text(
text = text,
style = MaterialTheme.typography.bodySmall,
)
}
}
@PreviewLightDark
@Composable
private fun InfoWidgetPreview() {
TachiyomiTheme {
Surface {
InfoWidget(text = stringResource(MR.strings.download_ahead_info))
}
}
}