68f4cf269d
Created by Github action <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/twentyhq/twenty/pull/22281?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. --> Co-authored-by: github-actions <github-actions@twenty.com>
39 lines
1.4 KiB
Plaintext
39 lines
1.4 KiB
Plaintext
---
|
|
title: Cambiar
|
|
icon: toggle-on
|
|
---
|
|
|
|
<Tabs>
|
|
<Tab title="Uso">
|
|
|
|
```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=""Props"">
|
|
|
|
|
|
| "Props" | Tipo | Descripción | Predeterminado |
|
|
| --------------- | -------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------- |
|
|
| valor | booleano | El estado actual del interruptor de palanca | `falso` |
|
|
| "onChange" | función | Función de retorno que se activa cuando el estado del interruptor de palanca cambia | |
|
|
| color | cadena | Color del interruptor de palanca cuando | es de color azul |
|
|
| tamañoConmutado | cadena | Tamaño del interruptor de palanca, que afecta tanto la altura como el ancho. Tiene dos opciones: `pequeño` y `mediano` | mediano |
|
|
|
|
|
|
|
|
</Tab>
|
|
</Tabs>
|