4.7.5 • Published 4 years ago

@sigeo/styleguide v4.7.5

Weekly downloads
186
License
GPL3
Repository
github
Last release
4 years ago

Sigeo Styleguide

Reusable React components that implement Material Design.

We working on live demo based on Storybook, give us little more time!

Installation

Sigeo Styleguide is available as an npm package.

// With npm
npm install @sigeo/styleguide

// With yarn
yarn add @sigeo/styleguide

Usage

You can use destructuring or tree shaking approach. Here is a quick example to get you started, it's all you need:

import React from 'react';
import ReactDOM from 'react-dom';
import { Button, Input } from '@sigeo/styleguide';

function App() {
  return (
    <React.Fragment>
      <Button variant='contained' color='primary'>
        Hello World
      </Button>
      <Input
        variant='outlined'
        label='Custom label'
        placeholder='Hello placeholder'
        fullWidth
      />
    </React.Fragment>
  );
}

ReactDOM.render(<App />, document.querySelector('#app'));

Components

Sigeo Styleguide have several components:

Button

You can use all Material Button props and:

PropertyTypeDescription
isLoadingbooleanShow spinner
...
import { Button } from "@sigeo/styleguide";
// import Button from '@sigeo/styleguide/lib/components/Button'
...

function App() {
  ...

  return (
    <Button
      isLoading={isLoading}
      variant="contained"
      color="primary"
    >
      Hello World
    </Button>
  );
}

Input

You can use all Material Text Field props and:

PropertyTypeDescription
iconnodeShow a custom start icon
endIconnodeShow a custom end icon
...
import { Input } from "@sigeo/styleguide";
// import Input from '@sigeo/styleguide/lib/components/Input'
import UserIcon from '@material-ui/icons/VerifiedUser';
...

function App() {
  ...

  return (
    <Input
      label="My label"
      error={existError}
      value='My value'
      disabled={isDisabled}
      icon={<UserIcon />}
      endIcon={<UserIcon />}
      onChange={this.handleChange}
      helperText='Help me!'
    >
  );
}

Textarea

You can use all Material Text Field props.

...
import { Textarea } from "@sigeo/styleguide";
// import Textarea from '@sigeo/styleguide/lib/components/Textarea'
...

function App() {
  ...

  return (
    <Textarea
      variant="outlined"
      label="Custom label"
      placeholder="Hello placeholder"
      fullWidth
    />
  );
}

Select

You can use all React Select props and:

PropertyTypeDescription
sizeone of normal (default), medium or largeShow a select based on React Select
...
import { Select } from "@sigeo/styleguide";
// import Select from '@sigeo/styleguide/lib/components/Select'
...

function App() {
  ...

  return (
    <Select
      options={options}
      size="medium"
      onChange={this.handleChange}
    />
  );
}

Text

You can use all Material Typography props and:

PropertyTypeDescription
customColorstringSet a custom color
...
import { Text } from '@sigeo/styleguide';
// import Text from '@sigeo/styleguide/lib/components/Text'
...

function App() {
  ...

  return (
    <Text variant='h2' customColor="#000">
      Hello guys!
    </Text>
  );
}

Drawer

You can use all Material Drawer props and:

PropertyTypeDescription
onClosefuncHandle on close function. If you not set it, you should not see the close icon.
...
import { Drawer } from '@sigeo/styleguide';
// import Drawer from '@sigeo/styleguide/lib/components/Drawer'
...

function App() {
  ...
  const [isVisible, changeVisibleState] = useState(false);

  return (
    <>
      <IconButton onClick={() => changeVisibleState(true)}>
        <MenuIcon fontSize="large" />
      </IconButton>
      <Drawer
        variant='persistent'
        anchor='left'
        open={isVisible}
        onClose={() => changeVisibleState(false)}
      >
        Hello mate, how are you?
      </Drawer>
    </>
  );
}

Password

You can show the password strength with this component:

PropertyTypeDescription
sizeone of small, medium (default), large or hugeSet the password point height based on size
labelstringSet a custom (and optionally) label
passwordstringThe password to evaluate
...
import { PasswordStrengthBar } from "@sigeo/styleguide";
// import PasswordStrengthBar from '@sigeo/styleguide/lib/components/Password'
...

function App() {
  ...

  return (
    <PasswordStrengthBar
      size="large"
      password='XXXXXXX'
    />
  );
}

License

Copyright © 2019 Sigeo S.R.L

Licensed under a GPL3+ license: http://www.gnu.org/licenses/gpl-3.0.txt

5.0.0-rc0.4

4 years ago

5.0.0-rc0.3

4 years ago

5.0.0-rc0.2

4 years ago

5.0.0-rc0.1

4 years ago

5.0.1

4 years ago

5.0.0

4 years ago

5.0.1-beta

4 years ago

5.0.0-beta

4 years ago

4.7.0

4 years ago

4.7.5

4 years ago

4.7.2

4 years ago

4.7.1

4 years ago

4.7.4

4 years ago

4.7.3

4 years ago

4.6.1

4 years ago

4.6.0

4 years ago

4.6.3

4 years ago

4.6.2

4 years ago

4.5.0

4 years ago

4.4.3

4 years ago

4.4.2

4 years ago

4.4.1

4 years ago

4.4.0

4 years ago

4.3.0

4 years ago

4.2.1

4 years ago

4.2.0

4 years ago

4.1.0

4 years ago

4.0.0

4 years ago

3.6.0

4 years ago

3.5.1

4 years ago

3.5.0

4 years ago

3.4.0

4 years ago

3.4.1

4 years ago

3.3.1

4 years ago

3.3.0

4 years ago

3.2.5

4 years ago

3.2.4

4 years ago

3.2.3

4 years ago

3.2.2

4 years ago

3.2.1

4 years ago

3.2.0

4 years ago

3.1.3

4 years ago

3.1.2

4 years ago

3.1.1

4 years ago

3.1.0

4 years ago

3.0.4

4 years ago

3.0.3

4 years ago

3.0.5

4 years ago

3.0.2

4 years ago

2.23.2

4 years ago

3.0.1

4 years ago

2.23.1

4 years ago

2.23.0

4 years ago

2.22.3

4 years ago

2.22.2

4 years ago

2.22.1

4 years ago

2.22.0

4 years ago

2.21.0

4 years ago

2.21.2

4 years ago

2.21.1

4 years ago

2.20.2

4 years ago

2.20.1

4 years ago

2.20.0

4 years ago

2.19.0

4 years ago

2.18.0

4 years ago

2.17.1

4 years ago

2.17.0

4 years ago

2.15.0

4 years ago

2.16.1

4 years ago

2.16.0

4 years ago

2.14.0

4 years ago

2.13.0

4 years ago

2.12.1

4 years ago

2.12.0

4 years ago

2.11.10

4 years ago

2.11.11

4 years ago

2.11.9

4 years ago

2.11.8

4 years ago

2.11.6

4 years ago

2.11.7

4 years ago

2.11.5

4 years ago

2.11.4

4 years ago

2.11.3

4 years ago

2.11.2

4 years ago

2.11.1

4 years ago

2.11.0

4 years ago

2.9.2

4 years ago

2.9.1

4 years ago

2.9.4

4 years ago

2.9.3

4 years ago

2.10.0

4 years ago

2.9.0

4 years ago

2.8.1

4 years ago

2.8.0

4 years ago

2.7.0

4 years ago

2.7.1

4 years ago

2.6.1

4 years ago

3.0.0

4 years ago

2.6.0

4 years ago

2.5.1

4 years ago

2.5.0

4 years ago

2.4.0

4 years ago

2.3.0

4 years ago

2.2.3

4 years ago

2.2.2

4 years ago

2.2.1

4 years ago

2.2.0

4 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.20.0

4 years ago

1.19.3

4 years ago

1.19.2

4 years ago

1.19.1

4 years ago

1.19.0

4 years ago

1.18.6

4 years ago

1.18.5

4 years ago

1.18.4

4 years ago

1.18.3

4 years ago

1.18.1

4 years ago

1.18.0

4 years ago

1.18.2

4 years ago

1.17.0

4 years ago

1.16.7

4 years ago

1.16.6

4 years ago

1.16.5

4 years ago

1.16.4

4 years ago

1.16.3

4 years ago

1.16.2

4 years ago

1.16.1

4 years ago

1.16.0

4 years ago

1.15.0

4 years ago

1.14.6

5 years ago

1.14.5

5 years ago

1.14.4

5 years ago

1.14.3

5 years ago

1.14.2

5 years ago

1.14.1

5 years ago

1.14.0

5 years ago

1.13.0

5 years ago

1.12.1

5 years ago

1.12.0

5 years ago

1.11.0

5 years ago

1.10.0

5 years ago

1.9.1

5 years ago

1.9.0

5 years ago

1.8.0

5 years ago

1.7.0

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago

0.15.0

5 years ago

0.14.2

5 years ago

0.14.1

5 years ago

0.14.0

5 years ago

0.13.1

5 years ago

0.13.0

5 years ago

0.12.0

5 years ago

0.11.0

5 years ago

0.10.0

5 years ago

0.9.0

5 years ago

0.8.0

5 years ago

0.7.2

5 years ago

0.7.1

5 years ago

0.7.0

5 years ago

0.6.0

5 years ago

0.5.3

5 years ago

0.5.2

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.0

5 years ago

0.3.0

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago