generated from nl-design-system/example
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: major update to how documentation is fetched and rendered and m…
…ade small fixes to make everything as consistent as possible (#1070) closes #981 closes #1010 also made first steps to use @utrecht/components, but only in storybook for now (#1009) - There are a lot of // TODO comments because in a lot of cases the documentation is not structurized correctly in @utrecht/components. Wherever it was in the right structure I used the Utrecht documentation as much as possible (although sometimes they were very lacking in content, in which cases I skipped them as well) - I added functionality to packages/storybook/config/preview.tsx to render links and componentOrigin text that can be added using the github, figma, nldesignsystem and componentOrigin parameters in storybook respectively. - Here is an example of a storybook page where the links are filled with parameters and the documentation is coming from @utrecht/components: [Radio button](https://rijkshuisstijl-community-git-chore-utre-1cc52e-nl-design-system.vercel.app/?path=/docs/rhc-radio--docs) --------- Co-authored-by: Ruben Smit <[email protected]>
- Loading branch information
Showing
98 changed files
with
526 additions
and
225 deletions.
There are no files selected for viewing
This file contains 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
File renamed without changes.
File renamed without changes.
This file contains 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 |
---|---|---|
@@ -1,10 +1 @@ | ||
import { Article as UtrechtArticle, ArticleProps as UtrechtArticleProps } from '@utrecht/component-library-react'; | ||
import { ForwardedRef, forwardRef, PropsWithChildren } from 'react'; | ||
|
||
export const Article = forwardRef( | ||
(props: PropsWithChildren<UtrechtArticleProps>, ref: ForwardedRef<HTMLDivElement>) => { | ||
return <UtrechtArticle ref={ref} {...props}></UtrechtArticle>; | ||
}, | ||
); | ||
|
||
Article.displayName = 'Article'; | ||
export { Article, type ArticleProps } from '@utrecht/component-library-react'; |
This file contains 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 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 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 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,15 @@ | ||
import '@testing-library/jest-dom'; | ||
|
||
import { render } from '@testing-library/react'; | ||
import { Textarea } from '.'; | ||
|
||
describe('Textarea', () => { | ||
it('renders a visible element', () => { | ||
const { container } = render(<Textarea />); | ||
|
||
const textarea = container.querySelector(':only-child'); | ||
|
||
expect(textarea).toBeInTheDocument(); | ||
expect(textarea).toBeVisible(); | ||
}); | ||
}); |
This file contains 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 @@ | ||
export { Textarea, type TextareaProps } from '@utrecht/component-library-react'; |
This file contains 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 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 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,5 @@ | ||
import { remark } from 'remark'; | ||
import remarkNormalizeHeadings from 'remark-normalize-headings'; | ||
|
||
export const mergeMarkdown = (markdown: string[]) => | ||
String(remark().use(remarkNormalizeHeadings).processSync(markdown.join('\n\n'))); |
This file contains 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 was deleted.
Oops, something went wrong.
This file contains 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 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 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 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 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 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.