Skip to content

Commit

Permalink
docs: minor doc improvements (#2283)
Browse files Browse the repository at this point in the history
* docs: minor doc improvements

* Sync definitions fyles

---------

Co-authored-by: Tobias Høegh <[email protected]>
  • Loading branch information
langz and tujoworker committed May 31, 2023
1 parent 884a09e commit 654ae82
Show file tree
Hide file tree
Showing 29 changed files with 71 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ You may check out the [DrawerList Properties](#drawerlist-properties) down below
| `size` | _(optional)_ define the height of the Autocomplete. Can be set to `small`, `default`, `medium` and `large`. Defaults to `default`. |
| `drawer_class` | _(optional)_ define a custom class for the internal drawer-list. This makes it possible more easily customize the drawer-list style with styled-components and the `css` style method. Defaults to `null`. |
| `show_submit_button` | _(optional)_ use `true` to show a Autocomplete button to toggle the [DrawerList](/uilib/components/fragments/drawer-list). Defaults to `false`. |
| `title` | _(optional)_ give a title to let the user know what they have to do. Defaults to `Skriv og få alternativer'` . |
| `title` | _(optional)_ give a title to let the user know what they have to do. Defaults to `Skriv og få alternativer`. |
| `align_autocomplete` | _(optional)_ use `right` to change the options alignment direction. Defaults to `left`. |
| `no_options` | _(optional)_ text show in the "no options" item. Defaults to `Ingen alternativer`. |
| `aria_live_options` | _(optional)_ text read out by screen readers. This way users with screen readers know how many options they got during typing. Defaults to `%s alternativer`. |
Expand All @@ -50,7 +50,7 @@ You may check out the [DrawerList Properties](#drawerlist-properties) down below
| `status_props` | _(optional)_ use an object to define additional FormStatus properties. |
| `global_status_id` | _(optional)_ the `status_id` used for the target [GlobalStatus](/uilib/components/global-status). |
| `label` | _(optional)_ prepends the Form Label component. If no ID is provided, a random ID is created. |
| `label_direction` | _(optional)_ use `label_direction="vertical"` to change the label layout direction. Defaults to `horizontal` |
| `label_direction` | _(optional)_ use `label_direction="vertical"` to change the label layout direction. Defaults to `horizontal`. |
| `label_sr_only` | _(optional)_ use `true` to make the label only readable by screen readers. |
| `suffix` | _(optional)_ text describing the content of the Autocomplete more than the label. You can also send in a React component, so it gets wrapped inside the Autocomplete component. |
| `skeleton` | _(optional)_ if set to `true`, an overlaying skeleton with animation will be shown. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ showTabs: true
| `size` | _(optional)_ the size of the button. For now there is **medium**, **default** and **large**. |
| `icon` | _(optional)_ to be included in the button. [Primary Icons](/icons/primary) can be set as a string (e.g. `icon="chevron_right"`), other icons should be set as React elements. |
| `icon_position` | _(optional)_ position of icon inside the button. Set to `left` or `right`. Tertiary button variant also supports `top`. Defaults to `right` if not set. |
| `icon_size` | _(optional)_ define icon width and height. Defaults to 16px |
| `icon_size` | _(optional)_ define icon width and height. Defaults to 16px. |
| `class` | _(optional)_ any extra modifying class. |
| `href` | _(optional)_ if you want the button to behave as a link. Use with caution! A link should normally visually be a link and not a button. |
| `target` | _(optional)_ When button behaves as a link. Used to specify where to open the linked document, specified by `href`. Possible values are `_self`, `_blank`, `_parent` and `_top`. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ import { DatePickerDateFnsRangeIsWeekend } from 'Docs/uilib/components/date-pick

## Events

| Events | Description |
| ---------------- | ------------------------------------------------------------------------------------------------------- |
| `on_change` | _(optional)_ will be called on a date change event. Returns an `object`. See above. |
| `on_type` | _(optional)_ will be called on every input and date picker interaction. Returns an `object`. See above. |
| `on_submit` | _(optional)_ will be called once a user presses the submit button. |
| `on_cancel` | _(optional)_ will be called once a user presses the cancel button. |
| `on_reset` | _(optional)_ will be called once a user presses the reset button. |
| `on_show` | _(optional)_ will be called once date-picker is visible. |
| `on_hide` | _(optional)_ will be called once date-picker is hidden. |
| `on_days_render` | _(optional)_ will be called right before every new calendar view gets rendered. See the example above. |
| Events | Description |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `on_change` | _(optional)_ will be called on a date change event. Returns an `object`. See Returned Object below. |
| `on_type` | _(optional)_ will be called on every input and date picker interaction. Returns an `object`. See Returned Object below. |
| `on_submit` | _(optional)_ will be called once a user presses the submit button. |
| `on_cancel` | _(optional)_ will be called once a user presses the cancel button. |
| `on_reset` | _(optional)_ will be called once a user presses the reset button. |
| `on_show` | _(optional)_ will be called once date-picker is visible. |
| `on_hide` | _(optional)_ will be called once date-picker is hidden. |
| `on_days_render` | _(optional)_ will be called right before every new calendar view gets rendered. See the example above. |

## Returned Object

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ You may check out the [DrawerList Properties](#drawerlist-properties) down below
| `status_props` | _(optional)_ use an object to define additional FormStatus properties. |
| `global_status_id` | _(optional)_ the `status_id` used for the target [GlobalStatus](/uilib/components/global-status). |
| `label` | _(optional)_ prepends the Form Label component. If no ID is provided, a random ID is created. |
| `label_direction` | _(optional)_ use `label_direction="vertical"` to change the label layout direction. Defaults to `horizontal` |
| `label_direction` | _(optional)_ use `label_direction="vertical"` to change the label layout direction. Defaults to `horizontal`. |
| `label_sr_only` | _(optional)_ use `true` to make the label only readable by screen readers. |
| `suffix` | _(optional)_ text describing the content of the Dropdown more than the label. You can also send in a React component, so it gets wrapped inside the Dropdown component. |
| `trigger_element` | _(optional)_ lets you provide a custom React element as the trigger HTML element. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ showTabs: true
| `alt` | _(optional)_ the alternative label (text version) of the icon. Defaults to the imported icon name. |
| `size` | _(optional)_ the dimension of the icon. This will be the `viewBox` and represent `width` and `height`. Defaults to `16`. You can use `small`,`medium`, `large` or `auto`. Auto will enable that the icon size gets inherited by the parent HTML element if it provides a `font-size`. |
| `color` | _(optional)_ the color can be any valid color property, such as Hex, RGB or preferable – any CSS variable from the [colors table](/uilib/usage/customisation/colors), e.g. `var(--color-ocean-green)`. Default is no color, which means `--color-black-80`. |
| `inherit_color` | _(optional)_ Default to `true`. Set to `false` if you do not want to inherit the color by `currentColor`. |
| `inherit_color` | _(optional)_ Defaults to `true`. Set to `false` if you do not want to inherit the color by `currentColor`. |
| `modifier` | _(optional)_ modifier class to define. Will result in: `dnb-icon--${modifier}`. |
| `skeleton` | _(optional)_ if set to `true`, an overlaying skeleton with animation will be shown. |
| [Space](/uilib/components/space/properties) | _(optional)_ spacing properties like `top` or `bottom` are supported. |
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ Defaults to Norwegian number format.
| `prefix` | (string): What to display before the amount. Defaults to an empty string. |
| `suffix` | (string): What to display after the amount. Defaults to an empty string. |
| `includeThousandsSeparator` | (boolean): Whether or not to separate thousands. Defaults to to `true`. |
| `thousandsSeparatorSymbol` | (string): Character with which to separate thousands. Default to `' '`. |
| `allowDecimal` | (boolean): Whether or not to allow the user to enter a fraction with the amount. Default to `false`. |
| `thousandsSeparatorSymbol` | (string): Character with which to separate thousands. Defaults to `' '`. |
| `allowDecimal` | (boolean): Whether or not to allow the user to enter a fraction with the amount. Defaults to `false`. |
| `decimalSymbol` | (string): Character that will act as a decimal point. Defaults to `','`. |
| `decimalLimit` | (number): How many digits to allow after the decimal. Defaults to `2`. |
| `integerLimit` | (number): Limit the length of the integer number. Defaults to `null` for unlimited. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ showTabs: true
| `value` | _(optional)_ the content value of the input. |
| `align` | _(optional)_ defines the text alignment of the input. Can be `left`, `right` or `center`. Defaults to `left`. |
| `label` | _(optional)_ prepends the Form Label component. If no ID is provided, a random ID is created. |
| `label_direction` | _(optional)_ use `label_direction="vertical"` to change the label layout direction. Defaults to `horizontal` |
| `label_direction` | _(optional)_ use `label_direction="vertical"` to change the label layout direction. Defaults to `horizontal`. |
| `label_sr_only` | _(optional)_ use `true` to make the label only readable by screen readers. |
| `status` | _(optional)_ text with a status message. The style defaults to an error message. You can use `true` to only get the status color, without a message. |
| `status_state` | _(optional)_ defines the state of the status. Currently, there are two statuses `[error, info]`. Defaults to `error`. |
Expand Down
Loading

0 comments on commit 654ae82

Please sign in to comment.