Created by Github action --------- Co-authored-by: Crowdin Bot <support+bot@crowdin.com> Co-authored-by: github-actions <github-actions@twenty.com>
40 lines
1.4 KiB
Plaintext
40 lines
1.4 KiB
Plaintext
---
|
|
title: Skift
|
|
image: /images/user-guide/table-views/table.png
|
|
---
|
|
|
|
<Frame>
|
|
<img src="/images/user-guide/table-views/table.png" alt="Header" />
|
|
</Frame>
|
|
|
|
<Tabs>
|
|
<Tab title="Usage">
|
|
|
|
```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">
|
|
|
|
| Egenskaber | Type | Beskrivelse | Standard |
|
|
| -------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------- | ------------ |
|
|
| værdi | boolean | The current state of the toggle | `falsk` |
|
|
| onChange | funktion | Callback function triggered when the toggle state changes | |
|
|
| farve | streng | Farven på skiften, når den\ | er blå farve |
|
|
| skiftStørrelse | streng | Size of the toggle, affecting both height and weight. Har to muligheder: `small` og `medium` | mellem |
|
|
|
|
</Tab>
|
|
</Tabs>
|