- Fixes #5504 - Fixes #5503 - Return 404 when the page does not exist - Modified the footer in order to align it properly - Removed "noticed something to change" in each table of content - Fixed the URLs of the edit module - Added the edit module to Developers - Fixed header style on the REST API page. - Edited the README to point to Developers - Fixed selected state when clicking on sidebar elements --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
36 lines
985 B
Plaintext
36 lines
985 B
Plaintext
---
|
|
title: Toggle
|
|
icon: TbToggleRight
|
|
image: /images/user-guide/table-views/table.png
|
|
---
|
|
|
|
<ArticleTabs label1="Usage" label2="Props">
|
|
<ArticleTab>
|
|
|
|
<SandpackEditor content={`import { Toggle } from "@/ui/input/components/Toggle";
|
|
|
|
export const MyComponent = () => {
|
|
return (
|
|
<Toggle
|
|
value = {true}
|
|
onChange = {()=>console.log('On Change event')}
|
|
color="green"
|
|
toggleSize = "medium"
|
|
/>
|
|
);
|
|
};`} />
|
|
|
|
</ArticleTab>
|
|
<ArticleTab>
|
|
|
|
<ArticlePropsTable options={[
|
|
['value', 'boolean', 'The current state of the toggle', '`false`'],
|
|
['onChange', 'function', 'Callback function triggered when the toggle state changes', ''],
|
|
['color', 'string', 'Color of the toggle when it\'s in the "on" state. If not provided, it uses the theme\'s blue color', ''],
|
|
['toggleSize', 'string', 'Size of the toggle, affecting both height and weight. Has two options: `small` and `medium`', 'medium']
|
|
]} />
|
|
|
|
</ArticleTab>
|
|
</ArticleTabs>
|
|
|
|
<ArticleEditContent></ArticleEditContent> |