This file contains hidden or 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
Detalles a tener en cuenta a la hora de hacer una nueva feature para que se vea correctamente en light mode y dark mode. | |
@yuno/design-system-web: 0.47.7 | |
En vez de importar el theme directamente del DS vamos a importar useTheme y tomarlo de ahí | |
import { theme } from '@yuno/design-system-web' -> Incorrecto, se ejecuta una sola vez en tiempo de carga, no se actualiza cuando se cambia de modo | |
import { useTheme } from '@yuno/design-system-web' -> Correcto, responde al cambio del modo | |
const theme: Theme = useTheme() // const { palette }: Theme = useTheme() |
This file contains hidden or 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
Detalles a tener en cuenta a la hora de hacer una nueva feature para que se vea correctamente en light mode y dark mode. | |
@yuno/design-system-web: 0.47.7 | |
En vez de importar el theme directamente del DS vamos a importar useTheme y tomarlo de ahí | |
import { theme } from '@yuno/design-system-web' -> Incorrecto, se ejecuta una sola vez en tiempo de carga, no se actualiza cuando se cambia de modo | |
import { useTheme } from '@yuno/design-system-web' -> Correcto, responde al cambio del modo | |
const theme: Theme = useTheme() // const { palette }: Theme = useTheme() |