(frontend) center error screen body

Added a new props on Text primitive to allow centering
the text if needed. It's align the design with the mockup.
This commit is contained in:
lebaudantoine
2024-08-04 21:58:46 +02:00
committed by aleb_the_flash
parent 01390b12fb
commit ca3b1f0297
2 changed files with 9 additions and 1 deletions

View File

@@ -14,7 +14,7 @@ export const ErrorScreen = ({ title, body }: {
<CenteredContent title={title || t('error.heading')} withBackButton>
{!!body && (
<Center>
<Text as="p" variant="h3">
<Text as="p" variant="h3" centered>
{body}
</Text>
</Center>

View File

@@ -45,6 +45,14 @@ export const text = cva({
},
inherits: {},
},
centered: {
true: {
textAlign: 'center',
},
false: {
textAlign: 'inherit',
},
},
bold: {
true: {
fontWeight: 'bold',