-
Notifications
You must be signed in to change notification settings - Fork 19
feat(docs): add package type information to the components pages #5984
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
Open
bucknatt
wants to merge
23
commits into
main
Choose a base branch
from
5768-add-package-type-information-to-the-components-pages
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
0ea0026
added package-info tag with default colors from tag variant on docs
bucknatt f753c84
added package-info tag with default colors from tag variant on docs
bucknatt 1761274
added tags as keyvalue for meta in dialog compo on docs
bucknatt 0dc66ea
added package-info tag with default colors from tag variant on docs
bucknatt 914e647
added package-info tag with default colors from tag variant on docs
bucknatt 2aa9f20
updated tag variant:
bucknatt cb9db62
added changeset
bucknatt 2b4b9fa
Create unlucky-peaches-join.md
bucknatt da2aa68
deleted duplicated changeset
bucknatt 1c3e6f0
fixed tag variant for default and yellow
bucknatt 33331f2
fixed props access in array
bucknatt 860dd75
made sure to remove unnecessary spaces
bucknatt 185fa7b
made sure to remove unnecessary spaces 2
bucknatt d43c56a
Merge branch 'main' into 5768-add-package-type-information-to-the-com…
bucknatt 02361a8
fixed lint warnings: added props definition for PackageTag, renamed a…
bucknatt 3ce6027
Merge remote-tracking branch 'origin/5768-add-package-type-informatio…
bucknatt 673ce51
removed duplicated line
bucknatt be5a421
reverted changes due to lint warnings on PackageTag
bucknatt 4e69ec7
re-reverted changes due to lint warnings on PackageTag: 'props' is no…
bucknatt 5dceccd
Merge branch 'main' into 5768-add-package-type-information-to-the-com…
bucknatt 8b43605
fix(docs): updated changeset
bucknatt 04e95a6
chore(docs): renamed mdx to tsx, updated logic for meta.props in pack…
bucknatt 0473c8e
feat(docs): fixed code-smell in package-tag.tsx
bucknatt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
'@swisspost/design-system-documentation': minor | ||
--- | ||
|
||
Added the information about package-type following the installation guide of the component, | ||
for all components on the documentation. | ||
The package type information is added as a tag component to the component pages. | ||
The tag variant gives the information, if the component is of package: | ||
- HTML (Default variant) | ||
- WebComponents (Yellow) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
type PackageTagProps = { | ||
meta: { | ||
tags: string[]; | ||
}; | ||
}; | ||
|
||
export default function PackageTag({ meta }: PackageTagProps) { | ||
let packageName = ''; | ||
const tagColor = ''; | ||
|
||
if (meta.tags.includes('package:Styles')) { | ||
packageName = '@swisspost/design-system-styles'; | ||
} else if (meta.tags.includes('package:WebComponents')) { | ||
packageName = '@swisspost/design-system-components'; | ||
} | ||
|
||
return ( | ||
<div className={`tag tag-sm mb-24 tag-${tagColor}`}> | ||
<div className="tag-text">{packageName}</div> | ||
</div> | ||
); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
packages/documentation/src/stories/components/card-product/card-product.docs.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
packages/documentation/src/stories/components/chip/chip.docs.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
packages/documentation/src/stories/components/collapsible/collapsible.docs.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
packages/documentation/src/stories/components/dialog/dialog.docs.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.