Files
twenty_crm/packages/twenty-website/src/content/twenty-ui/input/toggle.mdx
Ady Beraud ff1bca1816 Docs modifications (#5804)
- 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>
2024-06-11 09:45:17 +02:00

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>