8cadd00d34
Created by Github action --------- Co-authored-by: Crowdin Bot <support+bot@crowdin.com> Co-authored-by: github-actions <github-actions@twenty.com>
48 lines
2.4 KiB
Plaintext
48 lines
2.4 KiB
Plaintext
---
|
|
title: Checkbox
|
|
image: /images/user-guide/tasks/tasks_header.png
|
|
---
|
|
|
|
<Frame>
|
|
<img src="/images/user-guide/tasks/tasks_header.png" alt="Header" />
|
|
</Frame>
|
|
|
|
Користи се када корисник треба да изабере више вредности из више опција.
|
|
|
|
<Tabs>
|
|
<Tab title="Usage">
|
|
|
|
```jsx
|
|
import { Checkbox } from "twenty-ui/display";
|
|
|
|
export const MyComponent = () => {
|
|
return (
|
|
<Checkbox
|
|
checked={true}
|
|
indeterminate={false}
|
|
onChange={() => console.log("onChange function fired")}
|
|
onCheckedChange={() => console.log("onCheckedChange function fired")}
|
|
variant="primary"
|
|
size="small"
|
|
shape="squared"
|
|
/>
|
|
);
|
|
};
|
|
```
|
|
|
|
</Tab>
|
|
<Tab title="Props">
|
|
|
|
| Својства | Тип | Опис |
|
|
| --------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
| означено | булевска вредност | Indicates whether the checkbox is checked |
|
|
| indeterminate | булевска вредност | Indicates whether the checkbox is in an indeterminate state (neither checked nor unchecked) |
|
|
| приПромени | функција | The callback function you want to trigger when the checkbox state changes |
|
|
| onCheckedChange | функција | The callback function you want to trigger when the `checked` state changes |
|
|
| variant | низ | The visual style variant of the box. Опције укључују: `примарни`, `секундарни` и `терцијарни`. |
|
|
| величина | низ | The size of the checkbox. Has two options: `small` and `large` |
|
|
| облик | низ | The shape of the checkbox. Има две опције: `квадратна` и `заобљена` |
|
|
|
|
</Tab>
|
|
</Tabs>
|