Skip to content

Commit

Permalink
🎨 feat: apply eslint conventions to provider package
Browse files Browse the repository at this point in the history
  • Loading branch information
yondo123 committed Oct 18, 2023
1 parent b47e12d commit fd0655c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions packages/j-provider/src/ThemeProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/** @jsxImportSource @emotion/react */
import { Global } from '@emotion/react';
import reset from './styles/reset';
import { ThemeContext } from './context';
import { preset } from './preset';
import reset from './styles/reset';
import type { Preset } from './types';

export const ThemeProvider = (props: { children: React.ReactNode; presetConfig?: any }) => {
return (
<ThemeContext.Provider value={preset[preset.theme]}>
<Global styles={reset} />
{props.children}
</ThemeContext.Provider>
);
export const ThemeProvider = (props: { children: React.ReactNode; presetConfig?: Preset }) => {
const { children } = props;
<ThemeContext.Provider value={preset[preset.theme]}>
<Global styles={reset} />
{children}
</ThemeContext.Provider>;
};
3 changes: 1 addition & 2 deletions packages/j-provider/src/context.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { preset } from './preset';
import { createContext } from 'react';
import type { Preset } from './types';
import { preset } from './preset';

export const themePreset = preset[preset.theme];
export const ThemeContext = createContext(themePreset);
1 change: 1 addition & 0 deletions packages/j-provider/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { HEX } from '@jdesignlab/theme';

export interface ThemePreset {
color: {
background: HEX;
Expand Down

0 comments on commit fd0655c

Please sign in to comment.