0.31.3 • Published 5 months ago

@utima/ui-informed v0.31.3

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

@utima/ui-informed

@utima/ui components that are wrapped with informed library for form handling and can be used directly in Form component from informed.

Installation

Make sure to first install the @utima/ui library first, follow instructions here.

npm install @utima/ui-informed informed

tailwind.config.js

In your tailwind config file, add informed components to the content array:

import path from 'node:path';

export default {
  content: [
    // This should be here from @utima/ui initialization ->
    `${path.dirname(require.resolve('@utima/ui'))}/**/*.js`,
    // This is the new line for informed components ->
    `${path.dirname(require.resolve('@utima/ui-informed'))}/**/*.js`,
  ],
};

Usage

There are some default translations. If you want to replace them you need to wrap your application (or form) with FormTranslationsContext.Provider with value that will replace default translations, f.e.:

const translations = {
  errors: {
    required: 'Tento údaj je povinný',
  },
  labels: {
    optional: 'volitelné',
  },
};

function App() {
  return (
    <FormTranslationsContext.Provider value={translations}>
      ...
    </FormTranslationsContext.Provider>
  );
}

Devtools

Informed already provides <Debug /> component. We have been inspired by this and created more user friendly UI around it.

You can use it by importing DevTools component from @utima/ui-informed/devtools package and placing it in your application (it should be placed inside Form component since it's bound to it's state):

import { Suspense, lazy } from 'react';

// Use lazy to ensure code splitting
const UIFormDevtools = lazy(() =>
  import('@utima/ui-informed/devtools').then(res => {
    return {
      default: res.Devtools,
    };
  }),
);

function App() {
  return (
    <Form>
      <Suspense fallback={null}>
        <UIFormDevtools />
      </Suspense>
      ...
    </Form>
  );
}
1.0.0-alpha.4

5 months ago

1.0.0-alpha.3

5 months ago

1.0.0-alpha.2

5 months ago

1.0.0-alpha.1

10 months ago

0.31.3

10 months ago

1.0.0-alpha.0

10 months ago

0.31.2

1 year ago

0.31.1

1 year ago

0.31.0

1 year ago

0.30.0

1 year ago

0.29.0

1 year ago

0.29.1

1 year ago

0.28.0

1 year ago

0.27.3

1 year ago

0.27.2

1 year ago

0.27.1

1 year ago

0.27.0

1 year ago

0.26.1

1 year ago

0.26.0

1 year ago

0.25.0

1 year ago

0.24.2

1 year ago

0.24.1

1 year ago

0.24.0

1 year ago

0.23.0

1 year ago

0.22.1

1 year ago

0.21.4

1 year ago

0.22.0

1 year ago

0.21.0

1 year ago

0.21.3

1 year ago

0.21.2

1 year ago

0.21.1

1 year ago

0.19.0

1 year ago

0.1.2

1 year ago

0.20.0

1 year ago

0.1.3

1 year ago

0.1.1

1 year ago

1.0.0

1 year ago

2.0.0

1 year ago

0.1.0

1 year ago

0.0.0

1 year ago