0.0.1 ā¢ Published 3 years ago
@mergerocks/components v0.0.1
āØ Features
- š¦ A set of high-quality React components out of the box.
- š” Written in TypeScript with predictable static types.
- šØ Powerful theme customization in every detail.
š„ Environment Support
IE / Edge | Firefox | Chrome | Safari | Electron |
---|---|---|---|---|
IE11, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
š¦ Install
npm install @mergerocks/components
yarn add @mergerocks/components
šØ Usage
import { Button, MergeComponentsProvider } from '@mergerocks/components';
const App = () => (
<MergeComponentsProvider>
<Button>Button</Button>
</MergeComponentsProvider>
);
You can chamge theme:
import { Button, MergeComponentsProvider } from '@mergerocks/components';
const myCustomTheme = {
...
}
const App = () => (
<MergeComponentsProvider theme={myCustomTheme}>
<Button>Button</Button>
</MergeComponentsProvider>
);
TypeScript
@mergerocks/components
is written in TypeScript with complete definitions.
āØļø Development
$ git clone git@github.com:mergerocks/merge-components.git
$ cd merge-components
$ yarn
$ yarn dev
Open your browser and visit http://127.0.0.1:6006 , see more at Storybook.
šØ Theme
const borderRadius = '4px';
const colors = {
mainColor: '#2784FF',
};
const theme = {
fontFamily:
'-apple-system, BlinkMacSystemFont, "avenir next", avenir, "segoe ui", "helvetica neue", helvetica, Ubuntu, roboto, noto, arial, sans-serif',
components: {
button: {
backgroundColor: colors.mainColor,
backgroundColorHover: '#4d99ff',
backgroundColorActive: '#0570ff',
borderColor: colors.mainColor,
borderColorHover: '#4d99ff',
borderColorActive: '#0570ff',
color: 'white',
colorHover: 'white',
colorActive: 'white',
borderRadius,
fontSize: '0.9rem',
fontWeight: 500,
height: '34px',
padding: '0 32px',
},
},
scroll: {
backgroundColor: 'transparent',
color: colors.mainColor,
size: '2px',
borderRadius: '2px',
},
transition: {
duration: '0.2s',
timingFunction: 'ease-in-out',
},
};
License
This project is licensed under the MIT License - see the LICENSE.md file for details