A React component library.
npm install Huddly/huddly-storybook --save
Then import GlobalStyles from the library and wrap your app in it. It should look something like this:
import React from 'react';
import ReactDOM from 'react-dom';
import { GlobalStyles } from '@huddly/component-library';
import App from './App';
ReactDOM.render(
<React.StrictMode>
<GlobalStyles />
<App />
</React.StrictMode>,
document.getElementById('root')
);
Here are some examples of how to use the components in your app.
You can find all the components and more examples in Storybook.
import React from 'react';
import { Button } from '@huddly/component-library';
const App = () => {
return (
<Button color='lavender' onClick={handleClick} size='48'>
Click me
</Button>
);
};
import React from 'react';
import { Form, InputWrapper, Label, Input, Button } from '@huddly/component-library';
const App = () => {
return (
<Form onSubmit={handleSubmit}>
<InputWrapper id='email' isRequired={true}>
<Label>Email</Label>
<Input type='email' />
</InputWrapper>
<InputWrapper id='password' isRequired={true}>
<Label>Password</Label>
<Input type='password' />
</InputWrapper>
<Button type='submit'>Submit</Button>
</Form>
);
};
npm install
npm run storybook
Check out our React Icon Library.