@jenesei-software/jenesei-ui-react
v0.4.95
Published
This is a frontend library for React from Jenesei Software. Test.
Downloads
208
Maintainers
Readme
jenesei-ui-react
This is a frontend library for React from Jenesei Software. Test.
Customize the theme
To use themes in your application, create a declaration themes file and extend styled-comments
as follows:
// styled.d.ts
import 'styled-components';
import { IJeneseiTheme } from '@jenesei-software/jenesei-ui-react';
declare module 'styled-components' {
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export interface DefaultTheme extends IJeneseiTheme {
// Your additional theme properties
}
}
Import JeneseiTheme
and JeneseiGlobalStyles
from our library and apply them in the root component of your application:
// app.tsx
import {
JeneseiGlobalStyles,
JeneseiTheme,
} from '@jenesei-software/jenesei-ui-react'
function App() {
return (
...
<ThemeProvider theme={JeneseiTheme}>
<JeneseiGlobalStyles />
{/* Your components */}
</ThemeProvider>
...
)
}
Customize the cookie and local storage
//jenesei-ui-react.d.ts
import '@jenesei-software/jenesei-ui-react'
declare module '@jenesei-software/jenesei-ui-react' {
export interface ValidCookieObject {
access_token: string
refresh_token: string
}
export interface ValidLocalStorageObject {
access_token: string
refresh_token: string
}
}
IMPORTANT
Installing dependencies
To work correctly you need to install the following dependencies:
npm install react --save
npm install react-dom --save
npm install styled-components --save