From fd0655c354784e1aaa6e4c407e77e2644b7b39e3 Mon Sep 17 00:00:00 2001
From: yondo123 <46988995+yondo123@users.noreply.github.com>
Date: Thu, 19 Oct 2023 01:27:46 +0900
Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20feat:=20apply=20eslint=20convent?=
=?UTF-8?q?ions=20to=20provider=20package?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
packages/j-provider/src/ThemeProvider.tsx | 16 ++++++++--------
packages/j-provider/src/context.ts | 3 +--
packages/j-provider/src/types.ts | 1 +
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/packages/j-provider/src/ThemeProvider.tsx b/packages/j-provider/src/ThemeProvider.tsx
index 9e090a89..1f22ae2f 100644
--- a/packages/j-provider/src/ThemeProvider.tsx
+++ b/packages/j-provider/src/ThemeProvider.tsx
@@ -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 (
-
-
- {props.children}
-
- );
+export const ThemeProvider = (props: { children: React.ReactNode; presetConfig?: Preset }) => {
+ const { children } = props;
+
+
+ {children}
+ ;
};
diff --git a/packages/j-provider/src/context.ts b/packages/j-provider/src/context.ts
index be95b269..054202af 100644
--- a/packages/j-provider/src/context.ts
+++ b/packages/j-provider/src/context.ts
@@ -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);
diff --git a/packages/j-provider/src/types.ts b/packages/j-provider/src/types.ts
index 82a070a7..764ce9af 100644
--- a/packages/j-provider/src/types.ts
+++ b/packages/j-provider/src/types.ts
@@ -1,4 +1,5 @@
import type { HEX } from '@jdesignlab/theme';
+
export interface ThemePreset {
color: {
background: HEX;