Skip to content

Commit

Permalink
DS-297: Remove unnecessary controls from Storybook, add links in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
RiinaKuu committed May 24, 2024
1 parent 326378b commit 8b672c3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export class LinkComponent extends LinkApiDirective implements OnChanges {
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@Input() link: string | any[];

/**
* Title for the link, if not defined title will be the same as link URL
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ export default {
options: ['warning', 'danger', 'success', 'info'],
control: { type: 'radio' },
},
externalLink: {
control: { type: 'text' },
},
linkTitle: {
control: { type: 'text' },
},
},
} as Meta;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import * as NotificationStories from "./notification.stories.ts";

Notifications are often informative contextual notifications that cannot be clicked away. Input property `variant` can have following values:

- Yellow `warning` notification is used in notes.
- Yellow `warning` notification is used in notes
- Red `danger` notification describes an error situation
- Green `success` indicates the possibility or success of some function
- Blue `info`, on the other hand, is a neutral guideline.
- Blue `info`, on the other hand, is a neutral guideline

## Examples

Expand All @@ -21,9 +21,9 @@ Notifications are often informative contextual notifications that cannot be clic

Notification Component doesn't strict what content is contained.

It is recommended to use Body Text Components. The size Body Texts are set default to `lg-regular`. This can be overriden if needed.
It is recommended to use [Body Text Components](/docs/components-typography-body-text--documentation). Inside Notification, Body Text size defaults to `lg-regular` but this can be overriden if needed.

If using Link Component or Link Directive, for proper color contrast color of the links are set to `gray-dark`.
If using [Link Component](/docs/components-link--documentation) or [Link Directive](/docs/directives-link--documentation), for proper color contrast color of the links are set to `gray-dark`.

Otherwise Notification does not interfere with the content styling.

Expand All @@ -43,6 +43,7 @@ Please see code examples for recommended usage patterns.

- [Icon](/docs/components-icon--documentation)
- [Link](/docs/components-link--documentation)
- [BodyText](/docs/components-typography-body-text--documentation)

## Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export const linkExclude: RegExp = excludeRegex([
/**
* Notification
*/
export const notificationExclude: RegExp = excludeRegex(['link']);
export const notificationExclude: RegExp = excludeRegex(['link', 'linkTitle', 'externalLink']);

/**
* Section
Expand Down

0 comments on commit 8b672c3

Please sign in to comment.