-
-
Notifications
You must be signed in to change notification settings - Fork 2k
docs(www): add code tabs and copy functionality #4897
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for ngrx-io canceled.
|
✅ Deploy Preview for ngrx-site-v19 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
<mat-tab-group [preserveContent]="true"> | ||
@for (tab of tabs(); track tab) { | ||
<mat-tab [label]="tab.header"> | ||
<ngrx-code-example [innerHTML]="tab.code"> </ngrx-code-example> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not the best implementation, but it works.
The idea is to reuse the ngrx-code-example
in the content, and re-render it here using it's own rendered HTML.
The ngrx-code-example
is re-used here to have the copy functionality.
Co-authored-by: michael-small <[email protected]>
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Closes #4877
There's currently no implementation for code tabs.
What is the new behavior?
This PR implements a code tabs component, and updates the content to use the new component.
Does this PR introduce a breaking change?
Other information
Some notes: