1.0.16 • Published 6 years ago

@iunigo/ui-kit v1.0.16

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

Setup

yarn add @iunigo/ui-kit

Use

import { ThemeProvider } from "@iunigo/ui-kit";

export default () => (
  <ThemeProvider>
    <MyApp />
  </ThemeProvider>
)

ThemeProvider:ReactComponent

Inject the theme using Material and styled-componentes ThemeProviders. It uses the mainTheme

PropTypeDefault
themeValid theme objectmainTheme

mainTheme:Object

Default theme.


useTheme: Hook

Access to the theme using a hook.


Text(Typography):ReactComponent

Print text.

PropTypeDefault
variantEnumh1 | h2 | h3 | h4 | h5 | h6 | body1 | body2 | button | caption | overline""
boldbooleanfalse
......More props can be checked here

Responsivetext(Typography):ReactComponent

Same as Text but it allow to indicate a new size for any breakpoint.

PropTypeDefault
xsh1 | h2 | h3 | h4 | h5 | h6 | body1 | body2 | button | caption | overline""
smh1 | h2 | h3 | h4 | h5 | h6 | body1 | body2 | button | caption | overline""
mdh1 | h2 | h3 | h4 | h5 | h6 | body1 | body2 | button | caption | overline""
lgh1 | h2 | h3 | h4 | h5 | h6 | body1 | body2 | button | caption | overline""
xlh1 | h2 | h3 | h4 | h5 | h6 | body1 | body2 | button | caption | overline""

Button:ReactComponent

PropTypeDefault
variantEnumcontained | outlined | Textcontained
loadingbooleanfalse
......More props can be checked here

FlatButton:ReactComponent

PropTypeDefault
......More props can be checked here

Grid:ReactComponent

PropTypeDefault
......You can check more props here

GridContainer:ReactComponent

An alias for <Grid container>with the default breakpoints and max-width rules.

PropTypeDefault
......You can check more props here
import { GridContainer, Grid } from "@iunigo/ui-kit";

export default () => (
  <GridContainer spacing={3}>
    {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(n => (
      <Grid item xs={6} sm={1} md={1}>
        <span>
          Content
        </span>
      </Grid>
    ))}
  </GridContainer>
)

withNextSSR:HOC

Wrap _document in order to inject styles in next js ssr.

import Document, { Html, Head, Main, NextScript } from 'next/document'
import { withNextSSR } from "@iunigo/ui-kit";

class MyDocument extends Document {
  static async getInitialProps(ctx) {
    const initialProps = await Document.getInitialProps(ctx)
    return { ...initialProps }
  }

  render() {
    return (
      <Html>
        <Head>
          <link rel="stylesheet" href="/static/fonts/gt-walsheim/styles.css"/>
        </Head>
        <body>
          <Main />
          <NextScript />
        </body>
      </Html>
    )
  }
}

// Wrap the document
export default withNextSSR(MyDocument)
1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.0-alpha

6 years ago