From 28358b829bc6c38450d7d558cedac7126c0d5807 Mon Sep 17 00:00:00 2001 From: Veronica Gonzalez Date: Thu, 23 Jan 2025 14:09:16 +0100 Subject: [PATCH] docs(clayui.com): LPD-46156 Add API documentation --- packages/clay-core/docs/api-language-picker.mdx | 9 +++++++++ packages/clay-core/src/language-picker/index.tsx | 10 +++++----- 2 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 packages/clay-core/docs/api-language-picker.mdx diff --git a/packages/clay-core/docs/api-language-picker.mdx b/packages/clay-core/docs/api-language-picker.mdx new file mode 100644 index 0000000000..9c33c76bd0 --- /dev/null +++ b/packages/clay-core/docs/api-language-picker.mdx @@ -0,0 +1,9 @@ +--- +title: 'Language Picker' +description: 'A language picker is very similar to a dropdown visually but it let users select languages from the panel and then represent the selection in the button.' +mainTabURL: 'docs/components/language-picker.html' +--- + +## Language Picker + +
[APITable "clay-core/src/language-picker/index.tsx"]
diff --git a/packages/clay-core/src/language-picker/index.tsx b/packages/clay-core/src/language-picker/index.tsx index 98f0990344..d107a0d8c6 100644 --- a/packages/clay-core/src/language-picker/index.tsx +++ b/packages/clay-core/src/language-picker/index.tsx @@ -75,12 +75,12 @@ type Props = { id?: string; /** - * Messages for the component + * Messages for the component. */ messages?: Messages; /** - * List of locales to allow localization for + * List of locales to allow localization for. */ locales: Array; @@ -90,12 +90,12 @@ type Props = { onActiveChange?: InternalDispatch; /** - * Callback that gets called when a selected locale gets changed + * Callback that gets called when a selected locale gets changed. */ onSelectedLocaleChange?: InternalDispatch; /** - * Exposes the currently selected locale id + * Exposes the currently selected locale id (controlled). */ selectedLocaleId?: React.Key; @@ -110,7 +110,7 @@ type Props = { spritemap?: string; /** - * Translations provided to the component to be used and modified by it + * Translations provided to the component to display the translation language status. */ translations?: Translations; };