Skip to content

Commit

Permalink
docs(GlobalStatus): improve docs for id prop (#2067)
Browse files Browse the repository at this point in the history
  • Loading branch information
langz committed May 31, 2023
1 parent 7211261 commit 4c9477a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ showTabs: true

| Properties | Description |
| ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id` | _(optional)_ the main ID. Defaults to the prop |
| `id` | _(optional)_ the main ID. Defaults to `main`. |
| `title` | _(optional)_ the title appears as a part of the status content. Use `false` to hide / remove the title and icon. Defaults to `En feil har skjedd`. |
| `text` or `children` | _(optional)_ the text appears as the status content. Besides plain text, you can send in a React component as well. Defaults to `null`. |
| `items` | _(optional)_ the items (list items) appear as a part of the status content. you can both use an JSON array, or a vanilla array with a string or an object content. Se **Item Object** example below. |
Expand Down Expand Up @@ -68,6 +68,6 @@ The goal is to update the content (properties/events) of the target GlobalStatus

| Controller Properties | Description |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id` | _(optional)_ the main ID. Defaults to the prop `main`. |
| `id` | _(optional)_ the main ID. Defaults to `main`. |
| `status_id` | _(optional)_ define a new stack ID so you can remove it with the same ID later on. Defaults to `null`. |
| `remove_on_unmount` | _(optional)_ set to `true` if you want that the component `<GlobalStatus.Add remove_on_unmount={true} ... />` should automatically remove the stacked status from the target **GlobalStatus** on component unmount. Defaults to `false`. |
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface GlobalStatusProps
extends React.HTMLProps<HTMLElement>,
SpacingProps {
/**
* The main ID. Defaults to the prop
* The main ID. Defaults to `main`.
*/
id?: string;
status_id?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from 'react';
export interface GlobalStatusControllerProps
extends React.HTMLProps<HTMLElement> {
/**
* The main ID. Defaults to the prop
* The main ID. Defaults to `main`.
*/
id?: string;
status_id?: string;
Expand All @@ -19,7 +19,7 @@ export default class GlobalStatusController extends React.Component<

export interface GlobalStatusRemoveProps {
/**
* The main ID. Defaults to the prop
* The main ID. Defaults to `main`.
*/
id?: string;
status_id: string;
Expand Down

0 comments on commit 4c9477a

Please sign in to comment.