Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hacktoberfest: contribute to Sandpack Themes #596

Closed
danilowoz opened this issue Sep 30, 2022 · 8 comments
Closed

Hacktoberfest: contribute to Sandpack Themes #596

danilowoz opened this issue Sep 30, 2022 · 8 comments

Comments

@danilowoz
Copy link
Member

danilowoz commented Sep 30, 2022

image

We're open to supporting new Sandpack themes because our key goal is empowering developers to include custom live coding experiences over the web, regardless of your website layout or level of design expertise. That's why we provide plenty of options under @codesandbox/sandpack-themes, and we want to offer even more options. So, how can you contribute to new themes?

Sandpack Theme Builder

Sandpack provides a tool to guide you in creating your custom theme. Start with a dark or light theme, and then add your custom values like primary and secondary colors.

Plus, if you want to give an even more personal touch, you can go to the Advanced tab and set colors for the syntax highlight and other cases.

https://sandpack.codesandbox.io/theme

Publish a theme

At this point, you need to go to the Sandpack repository, fork, and introduce some changes in your pull request. BTW, you can just use CodeSandbox Projects to do that:

  1. Open the Sandpack repository on CodeSandbox Projects;
  2. Create a contribution branch, which will fork the repository for you:

Screenshot 2022-09-27 at 09 31 22

  1. Create a new file in codesandbox/sandpack/sandpack-themes/src folder with following file [theme name].ts
  2. The content of this file must be an export for an object that contains the theme:
import type { SandpackTheme } from "./types";

export const THEME_NAME: SandpackTheme = {
  colors: {
		...
  },

  syntax: {
		...
  },
  font: {
    ...
  },
};
  1. Include your new theme into the index.ts file, that exposes all themes.

Still not clear? Feel free to contact us on Discord or on GitHub.

@VedanthB
Copy link
Contributor

Hi I would like to give this a try.

@VedanthB
Copy link
Contributor

Hi @danilowoz I have added a theme and created a PR , please review.

@Ananyamadhu08
Copy link
Contributor

Hi can I also add another theme ?

@danilowoz
Copy link
Member Author

Sure, @Ananyamadhu08! It's open for contributions

@VedanthB
Copy link
Contributor

Hi @danilowoz can I add more themes ?

@danilowoz
Copy link
Member Author

Hey, sure! Let me know if you need any help 😄

@VedanthB
Copy link
Contributor

Hey @danilowoz , I've added a dew themes please review. 😄

@Ananyamadhu08
Copy link
Contributor

Ananyamadhu08 commented Oct 30, 2022

Hello @danilowoz, I have added some new themes as well please review 😃

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

No branches or pull requests

3 participants