Skip to content

Commit

Permalink
feat(themes): Renamed unstable_createTheme to experimental_createTheme (
Browse files Browse the repository at this point in the history
#2174)

Co-authored-by: Nikos Douvlis <[email protected]>
  • Loading branch information
royanger and nikosdouvlis authored Nov 21, 2023
1 parent 52ff8fe commit be5bc7b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/lovely-spies-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/themes': patch
---

Rename `unstable_createTheme` to `experimental_createTheme`
2 changes: 1 addition & 1 deletion packages/themes/src/createTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface CreateClerkThemeParams extends DeepPartial<Theme> {
elements?: Elements | ((params: { theme: InternalTheme }) => Elements);
}

export const unstable_createTheme = (appearance: Appearance<CreateClerkThemeParams>): BaseTheme => {
export const experimental_createTheme = (appearance: Appearance<CreateClerkThemeParams>): BaseTheme => {
// Placeholder method that might hande more transformations in the future
return { ...appearance, __type: 'prebuilt_appearance' };
};
4 changes: 2 additions & 2 deletions packages/themes/src/themes/dark.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { unstable_createTheme } from '../createTheme';
import { experimental_createTheme } from '../createTheme';

export const dark = unstable_createTheme({
export const dark = experimental_createTheme({
variables: {
colorBackground: '#19191A',
colorInputBackground: '#19191A',
Expand Down
4 changes: 2 additions & 2 deletions packages/themes/src/themes/neobrutalism.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { unstable_createTheme } from '../createTheme';
import { experimental_createTheme } from '../createTheme';

const buttonStyle = {
boxShadow: '3px 3px 0px #000',
Expand All @@ -14,7 +14,7 @@ const buttonStyle = {
},
};

export const neobrutalism = unstable_createTheme({
export const neobrutalism = experimental_createTheme({
variables: {
colorPrimary: '#DF1B1B',
colorTextSecondary: '#000',
Expand Down
4 changes: 2 additions & 2 deletions packages/themes/src/themes/shadesOfPurple.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { unstable_createTheme } from '../createTheme';
import { experimental_createTheme } from '../createTheme';
import { dark } from './dark';

export const shadesOfPurple = unstable_createTheme({
export const shadesOfPurple = experimental_createTheme({
baseTheme: dark,
variables: {
colorBackground: '#3f3c77',
Expand Down

0 comments on commit be5bc7b

Please sign in to comment.