Skip to content

Conversation

onurcancamci
Copy link

Hello,

I had noticed there was no way to use shiki themes in CodeHighlight component. Aside from forceColorScheme option when creating the adapther.

So I changed the codeColorScheme type to accept arbitrary strings like already done with MantineColor type. And changed a couple lines in adapther code.
I also added a storybook case to show the usage.

Also setting it as light wasn't working either so this fixes that too.

Unfortunately running npm run jest was giving me error before even starting. I followed contributing instructions and also using correct node and yarn versions. So some help would also be appreciated here.

npm run jest

> [email protected] jest
> jest

Error: Jest: Failed to parse the TypeScript config file /Volumes/Work/Code/Apps/mantine/jest.config.ts
  TSError: ⨯ Unable to compile TypeScript:
error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.

    at readConfigFileAndSetRootDir (/Volumes/Work/Code/Apps/mantine/node_modules/@jest/core/node_modules/jest-config/build/index.js:2269:13)
    at async readInitialOptions (/Volumes/Work/Code/Apps/mantine/node_modules/@jest/core/node_modules/jest-config/build/index.js:1147:13)
    at async readConfig (/Volumes/Work/Code/Apps/mantine/node_modules/@jest/core/node_modules/jest-config/build/index.js:918:7)
    at async readConfigs (/Volumes/Work/Code/Apps/mantine/node_modules/@jest/core/node_modules/jest-config/build/index.js:1168:26)
    at async runCLI (/Volumes/Work/Code/Apps/mantine/node_modules/@jest/core/build/index.js:1397:7)
    at async Object.run (/Volumes/Work/Code/Apps/mantine/node_modules/jest-cli/build/index.js:656:9)

@rtivital
Copy link
Member

Please update documentation to include the new feature. Do not create new demos, just code and description is enough.

@onurcancamci
Copy link
Author

I removed storybook demo. For docs, since there was no section about colorschemes, I updated it minimally. Mentioned themes loading in the shiki adaptor example and updated the props doc.
I can create a how to use colorschemes section to docs if you prefer.
Thanks for your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants