diff --git a/packages/dnb-design-system-portal/src/docs/uilib/components/anchor/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/components/anchor/properties.mdx index 654836e085d..33d44caaa45 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/components/anchor/properties.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/components/anchor/properties.mdx @@ -2,24 +2,12 @@ showTabs: true --- +import PropertiesTable from 'dnb-design-system-portal/src/shared/parts/PropertiesTable' +import { AnimatedContainerProperties } from '@dnb/eufemia/src/components/anchor/AnchorDocs' + ## Properties -| Properties | Description | -| --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -| `element` | _(optional)_ define what HTML or React element should be used (e.g. `element={Link}`). Defaults to semantic `a` element. | -| `href` | _(optional)_ relative or absolute url. | -| `to` | _(optional)_ use this prop only if you are using a router Link component as the `element` that uses the `to` property to declare the navigation url. | -| `target` | _(optional)_ defines the opening method. Use `_blank` to open a new browser window/tab. | -| `targetBlankTitle` | _(optional)_ the title shown as a tooltip when target is set to `_blank`. | -| `tooltip` | _(optional)_ Provide a string or a React Element to be shown as the tooltip content. | -| `icon` | _(optional)_ [Primary Icons](/icons/primary) can be set as a string (e.g. icon="chevron_right"), other icons should be set as React elements. | -| `iconPosition` | _(optional)_ `left` (default) or `right`. Places icon to the left or to the right of the text. | -| `noAnimation` | _(optional)_ removes animations if set to `true`. Defaults to `false`. | -| `noHover` | _(optional)_ removes hover effects if set to `true`. Defaults to `false`. | -| `noStyle` | _(optional)_ removes styling if set to `true`. Defaults to `false`. | -| `noUnderline` | _(optional)_ removes underline if set to `true`. Defaults to `false`. | -| `skeleton` | _(optional)_ if set to `true`, an overlaying skeleton with animation will be shown. | -| [Space](/uilib/layout/space/properties) | _(optional)_ spacing properties like `top` or `bottom` are supported. | + ### Router Link diff --git a/packages/dnb-eufemia/src/components/anchor/AnchorDocs.ts b/packages/dnb-eufemia/src/components/anchor/AnchorDocs.ts new file mode 100644 index 00000000000..b7228201a6a --- /dev/null +++ b/packages/dnb-eufemia/src/components/anchor/AnchorDocs.ts @@ -0,0 +1,76 @@ +import { PropertiesTableProps } from '../../shared/types' + +export const AnchorProperties: PropertiesTableProps = { + element: { + doc: 'Define what HTML or React element should be used (e.g. `element={Link}`). Defaults to semantic `a` element.', + type: 'Various', + status: 'optional', + }, + href: { + doc: 'Relative or absolute url.', + type: 'Various', + status: 'optional', + }, + to: { + doc: 'Use this prop only if you are using a router Link component as the `element` that uses the `to` property to declare the navigation url.', + type: 'Various', + status: 'optional', + }, + target: { + doc: 'Defines the opening method. Use `_blank` to open a new browser window/tab.', + type: 'Various', + status: 'optional', + }, + targetBlankTitle: { + doc: 'The title shown as a tooltip when target is set to `_blank`.', + type: 'Various', + status: 'optional', + }, + tooltip: { + doc: 'Provide a string or a React Element to be shown as the tooltip content.', + type: 'Various', + status: 'optional', + }, + icon: { + doc: '[Primary Icons](/icons/primary) can be set as a string (e.g. icon="chevron_right"), other icons should be set as React elements.', + type: 'Various', + status: 'optional', + }, + iconPosition: { + doc: '`left` (default) or `right`. Places icon to the left or to the right of the text.', + type: 'Various', + status: 'optional', + }, + noAnimation: { + doc: 'Removes animations if set to `true`. Defaults to `false`.', + type: 'Various', + status: 'optional', + }, + noHover: { + doc: 'Removes hover effects if set to `true`. Defaults to `false`.', + type: 'Various', + status: 'optional', + }, + noStyle: { + doc: 'Removes styling if set to `true`. Defaults to `false`.', + type: 'Various', + status: 'optional', + }, + noUnderline: { + doc: 'Removes underline if set to `true`. Defaults to `false`.', + type: 'Various', + status: 'optional', + }, + skeleton: { + doc: 'If set to `true`, an overlaying skeleton with animation will be shown.', + type: 'Various', + status: 'optional', + }, + '[Space](/uilib/layout/space/properties)': { + doc: 'Spacing properties like `top` or `bottom` are supported.', + type: ['string', 'object'], + status: 'optional', + }, +} + +export const AnchorEvents: PropertiesTableProps = {}