Skip to content

Commit

Permalink
refactor(doc): refactoring of the doc related to colors key config
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyDolle committed Feb 19, 2024
1 parent 0bd763d commit 967ddbc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
17 changes: 9 additions & 8 deletions documentation/docs/04-Guides/04-Theming/02-Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ keywords: [theme, theming, configuration, config, colors, fonts, gutters, spacin
The idea behind the theme configuration is to have a single source of truth for all the theme related values.
This is why the theme configuration is a simple object with the following structure:

| Key | Type | Description |
|--------------------|---------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|
| `fonts` | [`FontConfig`](/docs/theming/api-reference#fontconfig) | Define colors and sizes to generate associated styles (`color` and `fontSize`) |
| `gutters` | [`GuttersConfig`](/docs/theming/api-reference#guttersconfig) | Define sizes to generate associated styles (`padding` and `margin`) |
| `backgrounds` | `Record<string, string>` | Define colors generate associated styles (`backgroundColor`) |
| `borders` | [`BordersConfig`](/docs/theming/api-reference#bordersconfig) | Define colors, sizes and radius to generate associated styles (`borderColor`, `borderRadius`, `borderWidth`) |
| `navigationColors` | [`NavigationColorsConfig`](/docs/theming/api-reference#navigationcolorsconfig) | Define colors override ReactNavigation theme colors |
| `variants` | [`VariantsConfig`](/docs/theming/api-reference#variantsconfig) | Define a new theme based on the previous values |
| Key | Type | Description |
|--------------------|--------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|
| `colors` | [`colorConfig`](/docs/theming/api-reference#colorconfig) | Define global colors |
| `fonts` | [`FontConfig`](/docs/theming/api-reference#fontconfig) | Define colors and sizes to generate associated styles (`color` and `fontSize`) |
| `gutters` | [`GuttersConfig`](/docs/theming/api-reference#guttersconfig) | Define sizes to generate associated styles (`padding` and `margin`) |
| `backgrounds` | `Record<string, string>` | Define colors generate associated styles (`backgroundColor`) |
| `borders` | [`BordersConfig`](/docs/theming/api-reference#bordersconfig) | Define colors, sizes and radius to generate associated styles (`borderColor`, `borderRadius`, `borderWidth`) |
| `navigationColors` | [`NavigationColorsConfig`](/docs/theming/api-reference#navigationcolorsconfig) | Define colors override ReactNavigation theme colors |
| `variants` | [`VariantsConfig`](/docs/theming/api-reference#variantsconfig) | Define a new theme based on the previous values |

## Variants
A variant is a new theme based on the previous values.
Expand Down
6 changes: 6 additions & 0 deletions documentation/docs/04-Guides/04-Theming/04-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ keywords: [theme, theming, configuration, config, api, reference, api reference]

## Theme Configuration

### ColorConfig

| Key | Type | Description |
|----------|------------------------|----------------------|
| `colors` | Record<string, string> | Define global colors |

### FontConfig

| Key | Type | Description |
Expand Down

0 comments on commit 967ddbc

Please sign in to comment.