2b3b2362db
Created by Github action Co-authored-by: github-actions <github-actions@twenty.com>
39 lines
1.2 KiB
Plaintext
39 lines
1.2 KiB
Plaintext
---
|
|
title: Basculer
|
|
icon: toggle-on
|
|
---
|
|
|
|
<Tabs>
|
|
<Tab title="Utilisation">
|
|
|
|
```jsx
|
|
import { Toggle } from "twenty-ui/input";
|
|
|
|
export const MyComponent = () => {
|
|
return (
|
|
<Toggle
|
|
value = {true}
|
|
onChange = {()=>console.log('On Change event')}
|
|
color="green"
|
|
toggleSize = "medium"
|
|
/>
|
|
);
|
|
};
|
|
```
|
|
|
|
</Tab>
|
|
<Tab title="Propriétés">
|
|
|
|
|
|
| Propriétés | Type | Description | Par défaut |
|
|
| -------------- | -------- | ------------------------------------------------------------------------------------------ | -------------------- |
|
|
| valeur | booléen | The current state of the toggle | `faux` |
|
|
| onChange | fonction | Callback function triggered when the toggle state changes | |
|
|
| couleur | chaîne | Color of the toggle when it\ | est de couleur bleue |
|
|
| tailleBasculer | chaîne | Size of the toggle, affecting both height and weight. A deux options : `small` et `medium` | moyen |
|
|
|
|
|
|
|
|
</Tab>
|
|
</Tabs>
|