5d438bb70c
## Summary - **New Getting Started section** with quickstart guide and restructured navigation - **Halftone-style illustrations** for User Guide and Developer introduction cards using a Canvas 2D filter script - **Removed hero images** (`image:` frontmatter + `<Frame><img>` blocks) from all user-guide article pages - **Cleaned up translations** (13 languages): removed hero images and updated introduction cards to use halftone style - **Cleaned up twenty-ui pages**: removed outdated hero images from component docs - **Deleted orphaned images**: `table.png`, `kanban.png` - **Developer page**: fixed duplicate icon, switched to 3-column layout ## Test plan - [ ] Verify docs site builds without errors - [ ] Check User Guide introduction page renders halftone card images in both light and dark mode - [ ] Check Developer introduction page renders 3-column layout with distinct icons - [ ] Confirm article pages no longer show hero images at the top - [ ] Spot-check a few translated pages to ensure hero images are removed 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: github-actions <github-actions@twenty.com>
113 lines
3.8 KiB
Plaintext
113 lines
3.8 KiB
Plaintext
---
|
|
title: Radio
|
|
---
|
|
|
|
<Frame>
|
|
<img src="/images/user-guide/create-workspace/workspace-cover.png" alt="Antet" />
|
|
</Frame>
|
|
|
|
Utilizat când utilizatorii pot alege doar o opțiune dintr-o serie de opțiuni.
|
|
|
|
<Tabs>
|
|
<Tab title="Utilizare">
|
|
|
|
```jsx
|
|
import { Radio } from "twenty-ui/display";
|
|
|
|
export const MyComponent = () => {
|
|
|
|
const handleRadioChange = (event) => {
|
|
console.log("Radio button changed:", event.target.checked);
|
|
};
|
|
|
|
const handleCheckedChange = (checked) => {
|
|
console.log("Checked state changed:", checked);
|
|
};
|
|
|
|
|
|
return (
|
|
<Radio
|
|
checked={true}
|
|
value="Option 1"
|
|
onChange={handleRadioChange}
|
|
onCheckedChange={handleCheckedChange}
|
|
size="large"
|
|
disabled={false}
|
|
labelPosition="right"
|
|
/>
|
|
);
|
|
};
|
|
|
|
```
|
|
|
|
|
|
</Tab>
|
|
<Tab title="Proprietăți">
|
|
|
|
|
|
| Proprietăți | Tip | Descriere |
|
|
| ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------- |
|
|
| stil | proprietăți `React.CSS` | Stiluri suplimentare inline pentru componentă |
|
|
| numeClasa | șir | Clasă CSS opțională pentru stilizare suplimentară |
|
|
| bifat | boolean | Indică dacă butonul radio este selectat |
|
|
| valoare | șir | Eticheta sau textul asociat cu butonul radio |
|
|
| onChange | funcție | Funcția apelată când butonul radio selectat este schimbat |
|
|
| laSchimbareBifată | funcție | Funcția apelată atunci când starea `verificat` a butonului radio se schimbă |
|
|
| dimensiune | șir | Dimensiunea butonului radio. Opțiuni incluse: `mare` și `mic` |
|
|
| dezactivat | boolean | Dacă este `adevărat`, butonul radio este dezactivat și nu este clicabil |
|
|
| labelPosition | șir | Poziția textului etichetei în raport cu butonul radio. Are două opțiuni: `stânga` și `dreapta` |
|
|
|
|
|
|
|
|
|
|
</Tab>
|
|
</Tabs>
|
|
|
|
## Grup Radio
|
|
|
|
Groups together related radio buttons.
|
|
|
|
<Tabs>
|
|
<Tab title="Utilizare">
|
|
|
|
```jsx
|
|
import React, { useState } from "react";
|
|
import { Radio, RadioGroup } from "twenty-ui/display";
|
|
|
|
export const MyComponent = () => {
|
|
|
|
const [selectedValue, setSelectedValue] = useState("Option 1");
|
|
|
|
const handleChange = (event) => {
|
|
setSelectedValue(event.target.value);
|
|
};
|
|
|
|
return (
|
|
<RadioGroup value={selectedValue} onChange={handleChange}>
|
|
<Radio value="Option 1" />
|
|
<Radio value="Option 2" />
|
|
<Radio value="Option 3" />
|
|
</RadioGroup>
|
|
);
|
|
};
|
|
|
|
```
|
|
|
|
</Tab>
|
|
<Tab title="Proprietăți">
|
|
|
|
|
|
| Proprietăți | Tip | Descriere |
|
|
| ------------- | ----------------- | ------------------------------------------------------------------------------------- |
|
|
| valoare | șir | Valoarea butonului radio selectat în prezent |
|
|
| onChange | funcție | Funcția callback activată când butonul radio este schimbat |
|
|
| onValueChange | funcție | Funcția callback activată când valoarea selectată din grup se schimbă. |
|
|
| copii | `React.ReactNode` | Îți permite să trimiți componente React (cum ar fi Radio) ca și copii la Grupul Radio |
|
|
|
|
|
|
|
|
|
|
</Tab>
|
|
|
|
</Tabs>
|