Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: adds link to properties tab when linked to from properties docs #4227

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
showTabs: true
---

import PropertiesTable from 'dnb-design-system-portal/src/shared/parts/PropertiesTable'
import { FlexStackProperties } from '@dnb/eufemia/src/components/flex/StackDocs'

## Properties

| Property | Type | Description |
| ---------------------------------------------- | -------- | --------------------------------------------------------------------- |
| `direction` | `string` | _(optional)_ Defaults to `vertical`. |
| `align` | `string` | _(optional)_ Defaults to `stretch`. |
| [Flex.Container](/uilib/layout/flex/container) | Various | _(optional)_ Flex.Container properties. |
| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. |
<PropertiesTable props={FlexStackProperties} />
4 changes: 2 additions & 2 deletions packages/dnb-eufemia/src/components/card/CardDocs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ export const CardProperties: PropertiesTableProps = {
type: 'React.Node',
status: 'required',
},
'[Flex.Container](/uilib/layout/flex/container)': {
'[Flex.Container](/uilib/layout/flex/container/properties)': {
doc: 'Flex.Container properties.',
type: 'Various',
status: 'optional',
},
'[Flex.Item](/uilib/layout/flex/item)': {
'[Flex.Item](/uilib/layout/flex/item/properties)': {
doc: 'Flex.Item properties.',
type: 'Various',
status: 'optional',
Expand Down
24 changes: 24 additions & 0 deletions packages/dnb-eufemia/src/components/flex/StackDocs.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { PropertiesTableProps } from '../../shared/types'

export const FlexStackProperties: PropertiesTableProps = {
direction: {
doc: 'Defaults to `vertical`.',
type: 'string',
status: 'optional',
},
align: {
doc: 'Defaults to `stretch`.',
type: 'string',
status: 'optional',
},
'[Flex.Container](/uilib/layout/flex/container/properties)': {
doc: 'Flex.Container properties.',
type: 'Various',
status: 'optional',
},
'[Space](/uilib/layout/space/properties)': {
doc: 'Spacing properties like `top` or `bottom` are supported.',
type: ['string', 'object'],
status: 'optional',
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const EditContainerProperties: PropertiesTableProps = {
status: 'optional',
},

'[FlexVertical](/uilib/layout/flex/container/)': {
'[FlexVertical](/uilib/layout/flex/container/properties)': {
doc: 'All Flex.Vertical properties.',
type: 'Various',
status: 'optional',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const ViewContainerProperties: PropertiesTableProps = {
type: 'string',
status: 'optional',
},
'[FlexVertical](/uilib/layout/flex/container/)': {
'[FlexVertical](/uilib/layout/flex/container/properties)': {
doc: 'All Flex.Vertical properties.',
type: 'Various',
status: 'optional',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const ArrayProperties: PropertiesTableProps = {
type: ['React.ReactNode', 'function'],
status: 'optional',
},
'[Flex.Stack](/uilib/layout/flex/stack/)': {
'[Flex.Stack](/uilib/layout/flex/stack/properties)': {
doc: 'All Flex.Stack properties.',
type: 'Various',
status: 'optional',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const EditContainerProperties: PropertiesTableProps = {
type: 'boolean',
status: 'optional',
},
'[FlexVertical](/uilib/layout/flex/container/)': {
'[FlexVertical](/uilib/layout/flex/container/properties)': {
doc: 'All Flex.Vertical properties.',
type: 'Various',
status: 'optional',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const ViewContainerProperties: PropertiesTableProps = {
type: 'string',
status: 'optional',
},
'[FlexVertical](/uilib/layout/flex/container/)': {
'[FlexVertical](/uilib/layout/flex/container/properties)': {
doc: 'All Flex.Vertical properties.',
type: 'Various',
status: 'optional',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const StepProperties: PropertiesTableProps = {
type: 'React.Node',
status: 'required',
},
'[Flex.Container](/uilib/layout/flex/container)': {
'[Flex.Container](/uilib/layout/flex/container/properties)': {
doc: 'Flex.Container properties.',
type: 'Various',
status: 'optional',
Expand Down
Loading