feat(switch): update switch topics - #546
Conversation
| <PlatformBlock for="React,WebComponents,Blazor"> | ||
|
|
||
| <DocsAside type="warning" title="Warning"> | ||
| The <ApiLink pkg="core" type="Switch" /> component doesn't work with the standard `<form>` element. Use `Form` instead. |
There was a problem hiding this comment.
I don't know what that Form is... This needs a link or an elaboration. My guess is that it's actually a Blazor only note.
There was a problem hiding this comment.
@Hristo313 , I don't see the note about using Form instead of <form> in the doc anymore, I hope you checked and it's indeed no longer relevant.
There was a problem hiding this comment.
The warning is now scoped to Blazor only. In Blazor we should use EditForm instead of the standard HTML
element.|
|
||
| To use the {Platform} Switch, follow the [{ProductName} Getting Started](../general-getting-started.mdx) topic for the basic project setup, then register the component for your target platform. | ||
|
|
||
| <PlatformBlock for="Angular"> |
There was a problem hiding this comment.
I think both the Angular and the non-angular platform block under this one show the exact same content and can be combined .
| You can specify if the label should be positioned before or after the switch toggle by setting the <ApiLink pkg="core" type="Switch" member="labelPosition" label="LabelPosition" /> attribute of the switch. Allowed values are `before` and `after`(default): | ||
| <PlatformBlock for="Angular"> | ||
|
|
||
| You can use the <ApiLink type="IgxSwitchComponent" member="required" label="required" /> property to mark the switch as required. |
There was a problem hiding this comment.
This is similar to the previous comment. It seems that you are platformblock-ing the same text for Angular vs the Rest. I am not sure if this is hallucination on the agent side but it makes the document needlessly complicated.
If you are doing it because of issues with the ApiLink then those need to be fixed instead. (also you can just platformblock inline just the apilink as an interim solution.
| The switch can also be labelled by elements external to the switch. In this case, the user is given full control to position and style the label in accordance with their needs. | ||
| <PlatformBlock for="Angular"> | ||
|
|
||
| You can use the <ApiLink type="IgxSwitchComponent" member="invalid" label="invalid" /> property to mark the switch as invalid. |
There was a problem hiding this comment.
Same text between Angular and the rest - same comment as above
Closes #537
Update the switch xplat topics
Also updated the samples:
Angular -> IgniteUI/igniteui-angular-samples#4025
React -> IgniteUI/igniteui-react-examples#1102
WC -> IgniteUI/igniteui-wc-examples#1254
Blazor -> IgniteUI/igniteui-blazor-examples#1302
Checklist:
preview/beta./page.mdxor../relative/path.mdx(.mdxextension required)IgxSelectComponent,<igx-combo>code blocksfor the names of classes / tags / propertiescode blockscheck-api/mdxnpm commandsllms.descriptionmetadata and runnpm run check:llms-metadata