0.3.3 • Published 2 years ago

@felpsdev/softcomponents v0.3.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Softcomponents

Project

Project created for ReactJS UI's developing on Softjunk Fivem framework. It uses Mui packages for component developing and Styled Components for styling engine. It gaves all Mui features for good ui experience. Created for Softjunk developing team on propouse to make the ui construction faster and a lot better. You gonna see the documentation right after installation section.

Installation

# npm
npm i @felpsdev/softcomponents --save-dev

# yarn
yarn add @felpsdev/softcomponents

Documentation

You can see the components docs on Mui, and the styling docs on Styled Components, but we developed the theme provider system.

Theme Provider

import { ThemeProvider } from "@felpsdev/softcomponents/styles";

function App() {
    return (
        <ThemeProvider mode="light">
            <LandingPage />
        </ThemeProvider>
    );
}

Props

NameTypeDescription
childrennodeThe content of the component.
mode*"light" | "dark"Main color theme of the application.

The theme provider gonna as the name says provide the theme to your components, on Mui components and Styled components.

useTheme

import { useTheme } from "@felpsdev/softcomponents/styles";

function App() {
    const [theme, setMode] = useTheme();

    const handleChangeMode = () => {
        setMode(theme.palette.mode === "dark" ? "light" : "dark");
    };

    return (
        <div>
            <span>Current Mode: {theme.palette.mode}</span>
            <button onClick={handleChangeMode}>Change mode</button>
        </div>
    );
}

Return

IndexTypeDescription
0ThemeOptionsGive the theme options
1("light" | "dark") => voidFunction to change the current theme mode

The theme provider gonna as the name says provide the theme to your components, on Mui components and Styled components.

Others

    import { ... } from "@felpsdev/softcomponents/components";
    import { ... } from "@felpsdev/softcomponents/hooks";
    import { ... } from "@felpsdev/softcomponents/icons";
    import { ... } from "@felpsdev/softcomponents/utils";

The package have thoes folders, you can find components, hooks, icons and the utils. Everthing you need is in this folders.

License

0.3.3

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago