Skip to content

Commit

Permalink
Added documentation for properties on componentes
Browse files Browse the repository at this point in the history
  • Loading branch information
paal2707 committed Nov 19, 2024
1 parent 4583a53 commit 33dcefb
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 104 deletions.
26 changes: 9 additions & 17 deletions content/altinn-studio/reference/ux/components/Date/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,26 +54,18 @@ Add the following sections if relevant:

## Properties

{{% component-props %}}

<!-- | **Property** | **Type** | **Description** |
|--------------|------------------------------------------------|-----------------|
| `id` | string | Unique Id string for the component|
| `value` | string | The text you want to display |
| `textResourceBindings.title` | string | Label of the text you want to display |
| `direction` | string | Sets the structured direction of label and value. **Enum:** `"horizontal" \| "vertical"` |
| `icon` | string | An URL path to the image/icon | -->

<!-- The following is an autogenerated list of the properties available for {{% title %}} based on the component's JSON schema file (linked below).
{{% notice warning %}}
We are currently updating how we implement components, and the list of properties may not be entirely accurate.
{{% /notice %}}

The `component-props` shortcode automatically generates a list of component properties from the component's json schema.
The component name can be explicitly given as argument (e.g. `component-props "Grid"`).
If no argument is given, the shortcode pulls the component name from 'schemaname' in the frontmatter.
-->
| **Property** | **Type** | **Description** |
|------------------------------|----------|------------------------------------------------------------------------------------------|
| `id` | string | Unique Id string for the component |
| `value` | string | The date you want to display. Must be a ISO6801 string. |
| `textResourceBindings.title` | string | Label of the date you want to display |
| `format` | string | A formatting string based on [Unicode Technical standard](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table) |
| `direction` | string | Sets the structured direction of label and value. **Enum:** `"horizontal" \| "vertical"` |
| `icon` | string | An URL path to the image/icon |

## Configuration

Expand Down Expand Up @@ -107,7 +99,7 @@ Displays the value for the label and can be added as a ISO-date string or an exp

#### `format`

Sets the formatting of the date provided in the value field.
Sets the formatting of the date provided in the value field. This is based on [Unicode Technical standard](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table).

#### `direction`

Expand Down
27 changes: 9 additions & 18 deletions content/altinn-studio/reference/ux/components/Date/_index.nb.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,27 +54,18 @@ Add the following sections if relevant:

## Egenskaper

{{% component-props %}}

<!-- | **Property** | **Type** | **Description** |
|--------------|------------------------------------------------|-----------------|
| `id` | string | Unique Id string for the component|
| `value` | string | The text you want to display |
| `textResourceBindings.title` | string | Label of the text you want to display |
| `direction` | string | Sets the structured direction of label and value. **Enum:** `"horizontal" \| "vertical"` |
| `icon` | string | An URL path to the image/icon | -->

<!-- The following is an autogenerated list of the properties available for {{% title %}} based on the component's JSON schema file (linked below).
{{% notice warning %}}
We are currently updating how we implement components, and the list of properties may not be entirely accurate.
{{% /notice %}}

The `component-props` shortcode automatically generates a list of component properties from the component's json schema.
The component name can be explicitly given as argument (e.g. `component-props "Grid"`).
If no argument is given, the shortcode pulls the component name from 'schemaname' in the frontmatter.
{{% component-props %}} -->
| **Property** | **Type** | **Description** |
|------------------------------|----------|------------------------------------------------------------------------------------------------------------------------------------------|
| `id` | string | Unik Id streng for komponenten |
| `value` | string | Datoen du vil vise frem. Må være en ISO6801 string. |
| `textResourceBindings.title` | string | Labelen til datoen du vil vise |
| `format` | string | En formateringsstreng basert på [Unicode Teknisk standard](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table) |
| `direction` | string | Setter den strukturerte retningen på labelen og verdien. **Enum:** `"horizontal" \| "vertical"` |
| `icon` | string | En URL streng til bildet/ikonet |

## Konfigurering

Expand Down Expand Up @@ -108,7 +99,7 @@ Viser verdien til labelen og kan legges til som et ISO-dato streng eller et uttr

#### `format`

Setter formateringen for datoen gitt i `value` feltet.
Setter formateringen for datoen gitt i `value` feltet. Dette er basert på [Unicode Teknisk standard](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table).

#### `direction`

Expand Down
Loading

0 comments on commit 33dcefb

Please sign in to comment.