material-ui-color icon indicating copy to clipboard operation
material-ui-color copied to clipboard

Translation not possible with TypeScript

Open kgmv opened this issue 4 years ago • 1 comments

Describe the bug ColorPicker does not allow to apply translations (e.g. the 'SET' button) when using TypeScript

To Reproduce Add <ColorPicker /> component to a TypeScript React Component (with .tsx extension) . Between all the allowed properties translate is not visible.

Expected behaviour translate should be available to allow translating the control as in the Localization example of the docs: https://mikbry.github.io/material-ui-color/?id=components-colorpicker--localization&viewMode=docs

Screenshots image

kgmv avatar Apr 27 '21 09:04 kgmv

Thanks @kgmv, In fact it is a typo in ColorPicker story, you don't need to pass translate as parameter. It is a function passed to useTranslate hook used internally by ColorPicker.

mikbry avatar Apr 27 '21 13:04 mikbry