From 48c263c5766cb69173b08b61290a03c56c78c665 Mon Sep 17 00:00:00 2001 From: Kamran Habib <150379905+kamranhab@users.noreply.github.com> Date: Wed, 13 Dec 2023 04:24:10 +0530 Subject: [PATCH] Fixed Typo 1. It's generally good practice to include a space before the curly braces in the import statement for better readability. 2. descendants spelling was incorrect. 3. Replaced on with to which is a minor grammatical error --- .../docs/learn/05-theming/03-creating-themes.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/docs/docs/learn/05-theming/03-creating-themes.mdx b/apps/docs/docs/learn/05-theming/03-creating-themes.mdx index 8a99e4ea..f6ad9fb6 100644 --- a/apps/docs/docs/learn/05-theming/03-creating-themes.mdx +++ b/apps/docs/docs/learn/05-theming/03-creating-themes.mdx @@ -11,7 +11,7 @@ sidebar_position: 3 :::info Note The [`unstable_moduleResolution`](/docs/api/configuration/babel-plugin/#unstable_moduleresolution) -option needs to be enabled in the StyleX Babel configuration to enable theming APIs. +option must be enabled in the StyleX Babel configuration to enable theming APIs. ::: @@ -24,7 +24,7 @@ Any variable group can be imported to create a theme like so: ```tsx title="themes.js" import * as stylex from '@stylexjs/stylex'; -import {colors, spacing} from './tokens.styles'; +import { colors, spacing } from './tokens.styles'; // A constant can be used to avoid repeating the media query const DARK = '@media (prefers-color-scheme: dark)'; @@ -46,12 +46,12 @@ export const dracula = stylex.createTheme(colors, { A “theme” is a style object similar to the ones created with `stylex.create()`. They can be applied to an element using `stylex.props()` to override variables -for that element and all its descendents. +for that element and all its descendants. ```tsx title="components/MyComponent.js" import * as stylex from '@stylexjs/stylex'; -import {colors, spacing} from '../tokens.styles'; -import {dracula} from '../themes'; +import { colors, spacing } from '../tokens.styles'; +import { dracula } from '../themes'; const styles = stylex.create({ container: { @@ -74,7 +74,7 @@ components. :::info -If multiple themes for the same variable group are applied on the same HTML +If multiple themes for the same variable group are applied to the same HTML element, the last applied theme wins. :::