Skip to content

afito-com/afito-ui

Repository files navigation

afito-ui

Components designed for Afito Apps

Build Status Codecov Dependencies

Install

npm i afito-ui

Usage with create-react-app

// index.js
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App.js';
import { ThemeProvider } from 'afito-ui';
import { unregister } from './registerServiceWorker';

ReactDOM.render(
  <ThemeProvider>
    <App />
  </ThemeProvider>,
  document.getElementById('dashboard_root')
);
unregister();
// MyComponent.js
import React from 'react';
import { Container, Row, Column, Heading, Text } from 'afito-ui';

export default function MyComponent() {
  return (
    <Container>
      <Row>
        <Column xs={12}>
          <Heading level={1}>Hello World</Heading>
          <Text>That was easy</Text>
        </Column>
      </Row>
    </Container>
  );
}

Component Reference

Props

  • createProperty
  • onCompleted
  • onPropertyCreated
  • user_id

Grid

<Textarea /> Typography