New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Corregido Storybook del componente Text #18
Corregido Storybook del componente Text #18
Conversation
…ated its imports on Storybooks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No se como no nos dimos cuenta de eso, que mal que revisamos
Pull Request Test Coverage Report for Build 5870192674
💛 - Coveralls |
src/components/Text/index.tsx
Outdated
|
||
interface TextProps extends TextComponentProps { | ||
children?: ReactElement | string; | ||
style?: TextStyle[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/components/StatusChip/index.tsx
Outdated
@@ -19,7 +20,7 @@ const StatusChip = ({children, ...props}: StatusChipProps) => { | |||
|
|||
return ( | |||
<View style={styles(props).ViewStyles} {...props}> | |||
{isCustomComponent ? children : <Text style={styles(props).TextStyles}>{children}</Text>} | |||
{isCustomComponent ? children : <Text style={[styles(props).TextStyles]}>{children}</Text>} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Esto tendria que ver con el otro comentario, aqui no hace falta pasar los estilos como array
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Listo @WilliamSaya-lvl30 ahí ya lo corregí!
LINK DE TICKET:
https://janiscommerce.atlassian.net/browse/JUIP-113
DESCRIPCIÓN DEL REQUERIMIENTO:
Contexto
Actualmente se está tomando el componente Text de un archivo que se está armando en una carpeta del mismo nombre en la carpeta de Storybook
Necesidad
Se necesita usar el componente Text de la carpeta components, eliminando el archivo en dónde se arma el Text que se está utilizando actualmente en Storybook
DESCRIPCIÓN DE LA SOLUCIÓN:
Se eliminó el componente Text que se estaba utilizando en Storybook, por esto, se modificaron los imports del Storybook Text y StatusChip para utilizar el componente Text de la carpeta components.
Además, se modificó el componente Text, esto debido a que no estaba aceptando los props de styles correctamente, por lo que ahora se le comenzaron a pasar el resto de props que se le pasen al componente, al StyleSheet del componente.
CÓMO SE PUEDE PROBAR?
Clonar e instalar el Repo de UI-Native
Correr los siguientes 3 comandos en tres pestañas diferentes de la termina
npm run start
npm run android
npm run storybook
Se debe abrir la app en el emulador con storybooks y el navegador en la url http://localhost:7007/ donde se podrá probar
el comportamiento del componente
Para linkear el componente con un proyecto, seguir la siguiente documentación
https://fizzmod.atlassian.net/wiki/spaces/JAPP/pages/2341765125/C+mo+trabajo+con+el+package+UI