ui-kit icon indicating copy to clipboard operation
ui-kit copied to clipboard

Feature request: bundle types into the UI kit preset

Open jocelyn-dunkley opened this issue 1 year ago • 0 comments

Describe the bug If I want to use a type from a component I need to import the specific component package separately and reference it like this:

import SelectField, {
  type TCustomEvent,
} from '@commercetools-uikit/select-field';

But ideally I would like to put it in the same bigger import here:

import {
  Text,
  Spacings,
  SecondaryButton,
  MultilineTextField,
  TextField,
  NumberField,
  Grid,
} from '@commercetools-frontend/ui-kit';

Doing something like this doesn't seem to work:

import {
  Text,
  Spacings,
  SecondaryButton,
  MultilineTextField,
  TextField,
  NumberField,
  Grid,
  SelectField, {
    type TCustomEvent,
  }
} from '@commercetools-frontend/ui-kit';

Expected behavior I want to be able to import types directly from the ui-kit package and not import the specific component each time. This disrupts the code pattern that we're trying to stick with.

jocelyn-dunkley avatar Oct 16 '24 14:10 jocelyn-dunkley