From 34b4a7630000ad963c6a006b8303b3d1bc684a81 Mon Sep 17 00:00:00 2001 From: Karine Brandelli Padilha Date: Mon, 30 Dec 2024 15:44:55 -0300 Subject: [PATCH] chore: adjust typography stories --- .../typography/typography.stories.tsx | 54 ++++++++++++++++--- 1 file changed, 46 insertions(+), 8 deletions(-) diff --git a/src/core/data-display/typography/typography.stories.tsx b/src/core/data-display/typography/typography.stories.tsx index be46fa8d..b7c35631 100644 --- a/src/core/data-display/typography/typography.stories.tsx +++ b/src/core/data-display/typography/typography.stories.tsx @@ -1,6 +1,9 @@ import React from 'react' import type { Meta, StoryObj } from '@storybook/react' import Typography from '.' +import { theme } from '@/theme' + +const { primary } = theme.colors const meta: Meta = { title: 'DataDisplay/Typography', @@ -29,9 +32,9 @@ const meta: Meta = { control: { type: 'radio' }, description: 'The variants based on the HTML tags. Must be ' + - '`h1 | h2 | h3 | h4 | h5 | h6 | subtitle1 | subtitle2 | body1 | body2`' + - '`| caption | button | overline`. ' + - 'If not set, the default is "body1"' + '`h1 | h2 | h3 | h4 | h5 | h6 | subtitle1 | subtitle2 | body1 |` ' + + '` body2 | caption | button | overline`. ' + + 'If not set, the default is `body2`.' }, color: { options: [ @@ -40,13 +43,23 @@ const meta: Meta = { 'secondary', 'error', 'textPrimary', - 'textSecondary' + 'textSecondary', + 'textDisabled' ], control: { type: 'radio' }, description: 'The text color. Must be ' + - '`default | primary | secondary | error | textPrimary | textSecondary `. ' + - 'If not set, the default is "default"' + '`default | primary | secondary | error |` ' + + '`textPrimary | textSecondary | textDisabled.` ' + + 'If not set, the default is `default`.' + }, + align: { + options: ['inherit', 'center', 'right', 'left', 'justify'], + control: { type: 'radio' }, + description: + 'The text alignment. Must be ' + + '`inherit | center | right | left | justify.` ' + + 'If not set, the default is `left`.' }, margin: { control: 'text', @@ -69,12 +82,37 @@ type Story = StoryObj export const typography: Story = { render: ({ ...args }) => { - return + return ( + <> + + Como um utilitário CSS, o componente Typography também + suporta todas as propriedades{' '} + + system + + . Você pode usá-las como props diretamente no componente. + + + + + ) }, args: { - children: 'This is a text!', + children: 'This is Typography component text!', variant: 'body1', color: 'default', + align: 'left', margin: '0px', padding: '0px', style: {}