0.0.87 • Published 11 months ago

flop-ui-theme v0.0.87

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

Flop UI Theme

Flop UI Theme is a custom design system built on top of Material-UI, designed to provide a consistent and customizable user interface for your applications.

Features

  • Custom Material-UI theme
  • Global CSS styles for grids, icons, and spacing
  • Easy integration with existing React projects

Installation

To install the Flop UI Theme, run the following command:

npm install flop-ui-theme

or if you are using yarn:

yarn add flop-ui-theme

Usage

Applying the Theme

To apply the Flop UI Theme in your project, wrap your application with the ThemeProvider and pass the custom theme.

import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import { ThemeProvider } from '@mui/material/styles';
import { theme } from 'flop-ui-theme';
import 'flop-ui-theme/dist/styles.css'; // Import global styles

ReactDOM.render(
  <ThemeProvider theme={theme}>
    <App />
  </ThemeProvider>,
  document.getElementById('root')
);

Using Global Styles

You can use the global CSS classes defined in the Flop UI Theme in your components:

import React from 'react';
import Box from '@mui/material/Box';
import Button from '@mui/material/Button';

const ExampleComponent = () => (
  <Box className="grid-container">
    <Button variant="contained" color="primary" className="spacing-8">
      Primary Button
    </Button>
    <Button variant="contained" color="secondary" className="spacing-8">
      Secondary Button
    </Button>
  </Box>
);

export default ExampleComponent;

Storybook

We use Storybook for developing, testing, and documenting our components. To see the Flop UI Theme in action and explore the components, you can run Storybook.

Running Storybook

First, make sure you have installed all dependencies:

npm install

or if you are using yarn:

yarn install

Then, start Storybook:

npm run storybook

or with yarn:

yarn storybook

Creating Stories

To create stories for your components, add .stories.tsx files in the same directory as your components.

Example: src/components/ExampleComponent.stories.tsx

import React from 'react';
import { ThemeProvider } from '@mui/material/styles';
import { ComponentMeta, ComponentStory } from '@storybook/react';
import ExampleComponent from './ExampleComponent';
import { theme } from 'flop-ui-theme';
import 'flop-ui-theme/dist/styles.css'; // Import global styles

export default {
  title: 'Example/ExampleComponent',
  component: ExampleComponent,
} as ComponentMeta<typeof ExampleComponent>;

const Template: ComponentStory<typeof ExampleComponent> = (args) => (
  <ThemeProvider theme={theme}>
  <ExampleComponent {...args} />
  </ThemeProvider>
);

export const Default = Template.bind({});
Default.args = {
  // Add default props here if needed
};

Development

Building the Package

To build the Flop UI Theme package, run the following command from the root directory:

npm run build

or with yarn:

yarn build

This will create the necessary files in the dist directory.

Contributing

We welcome contributions to improve the Flop UI Theme! If you find a bug or have a feature request, please open an issue or submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

0.0.84

11 months ago

0.0.85

11 months ago

0.0.86

11 months ago

0.0.87

11 months ago

0.0.83

11 months ago

0.0.80

12 months ago

0.0.81

12 months ago

0.0.82

11 months ago

0.0.78

12 months ago

0.0.79

12 months ago

0.0.74

1 year ago

0.0.75

1 year ago

0.0.76

1 year ago

0.0.77

1 year ago

0.0.73

1 year ago

0.0.70

1 year ago

0.0.71

1 year ago

0.0.72

1 year ago

0.0.67

1 year ago

0.0.68

1 year ago

0.0.69

1 year ago

0.0.62

1 year ago

0.0.63

1 year ago

0.0.64

1 year ago

0.0.65

1 year ago

0.0.66

1 year ago

0.0.60

1 year ago

0.0.61

1 year ago

0.0.59

1 year ago

0.0.44

1 year ago

0.0.45

1 year ago

0.0.47

1 year ago

0.0.51

1 year ago

0.0.52

1 year ago

0.0.53

1 year ago

0.0.54

1 year ago

0.0.55

1 year ago

0.0.56

1 year ago

0.0.57

1 year ago

0.0.58

1 year ago

0.0.50

1 year ago

0.0.48

1 year ago

0.0.49

1 year ago

0.0.6

1 year ago

0.0.43

1 year ago

0.0.41

1 year ago

0.0.42

1 year ago

0.0.40

1 year ago

0.0.37

1 year ago

0.0.38

1 year ago

0.0.39

1 year ago

0.0.34

1 year ago

0.0.35

1 year ago

0.0.36

1 year ago

0.0.30

1 year ago

0.0.31

1 year ago

0.0.32

1 year ago

0.0.21

1 year ago

0.0.33

1 year ago

0.0.22

1 year ago

0.0.23

1 year ago

0.0.24

1 year ago

0.0.25

1 year ago

0.0.26

1 year ago

0.0.27

1 year ago

0.0.28

1 year ago

0.0.29

1 year ago

0.0.2

1 year ago

0.0.11

1 year ago

0.0.1

1 year ago

1.0.0

1 year ago