Skip to content

Commit

Permalink
fix: typo on docs
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaSimonePorceddu authored and Mauro Erta committed Nov 22, 2022
1 parent 912a3d2 commit 8ecb642
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions docs/docs/ThemeSpecification/colorSchemas.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { ColorSchemas } from '@morfeo/spec';

Using the [CLI compose command](../Features/CLI/compose.mdx):

```typescript title="colors.morfeo.ts"
```typescript title="colorSchemas.morfeo.ts"
// Remove this line to add the slice to all of your themes
export const themeName = 'My Theme Name';
// Optional if you name the file colorSchemas.morfeo.ts
Expand All @@ -49,10 +49,10 @@ export default {

Or manually:

```typescript title="colors.ts"
import { Colors } from '@morfeo/spec';
```typescript title="colorSchemas.ts"
import { ColorSchemas } from '@morfeo/spec';

const colorSchemas: Colors = {
const colorSchemas: ColorSchemas = {
primary: {
background: 'primary',
foreground: 'white'
Expand All @@ -61,7 +61,7 @@ const colorSchemas: Colors = {
```

```typescript title="theme.ts"
import { colors } from './colors';
import { colorSchemas } from './colorSchemas';

const myTheme = {
colorSchemas,
Expand Down Expand Up @@ -116,8 +116,7 @@ const styleWithColorSchema = morfeo.resolve({

## Extend Slice with custom properties

If you're using typescript and you add custom colors to your theme configuration, you'll need to merge
the default `ColorSchemas` interface with your custom one.
If you're using typescript and you add custom colorSchemas into your theme configuration, you'll need to merge the default `ColorSchemas` interface with your custom one.
We suggest creating a declaration file (for example: `morfeo.d.ts` or `types.d.ts`) like the following one:

```typescript
Expand Down

0 comments on commit 8ecb642

Please sign in to comment.