Add a readme

This commit is contained in:
Zoe Roux
2022-11-13 00:15:12 +09:00
parent 3c6e58b6b7
commit 77aa4606d8
13 changed files with 308 additions and 33 deletions
+36
View File
@@ -0,0 +1,36 @@
//
// Copyright (c) Zoe Roux and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
//
import { Theme, ThemeProvider, useYoshiki } from "yoshiki";
import { AppProps } from "next/app";
declare module "yoshiki" {
export interface Theme {
spacing: string;
name: string;
}
}
export const theme: Theme = {
spacing: "24px",
name: "yoshiki",
};
const AppName = () => {
const { css, theme } = useYoshiki();
return <p {...css({ padding: (theme) => theme.spacing })}>{theme.name}</p>;
};
const App = ({ Component, pageProps }: AppProps) => {
return (
<ThemeProvider theme={theme}>
<Component {...pageProps} />
<AppName />
</ThemeProvider>
);
};
export default App;