import { RtText } from '@dpa/react-text'; import { RtChips, RtChipsAction, RtChipsCheckbox } from '@dpa/react-chips'; import { SparkTypographyIcon } from '@dpa/react-typography-icons'; import { ChangeEvent, useState } from 'react'; import { ChipsFilter } from '../../recipes/chips-filter/chips-filter'; import { RecipeBlock } from '../../ui/recipe-block/recipe-block'; import { RecipePage } from '../../ui/recipe-page/recipe-page'; const options = Array.from({ length: 50, }).map((_, idx) => ({ id: idx, label: `Бренд ${idx}`, groupName: idx > 25 ? 'Группа В' : idx > 10 ? 'Группа Б' : 'Группа А', counter: `${Math.floor(Math.random() * 100)}`, })); export function ChipsPage() { const [state, setState] = useState([]); const [checked, setChecked] = useState(false); const [values, setValues] = useState([2, 3]); const Slot = () => { return (
Рекомендации от предмета
2

[Предмет]
4
); }; const handleChange1 = (event: ChangeEvent) => { const nextState = [...state]; nextState[0] = event.target.value; setState(nextState); }; const handleChange2 = (event: ChangeEvent) => { const nextState = [...state]; nextState[1] = event.target.value; setState(nextState); }; return ( setValues(value as number[])} />
setState([])} size="xs" defaultLabel="Label" radius="primary" use="primary" modifier="base" leadingIcon={SparkTypographyIcon} labels={state} slot={} /> setState([])} size="sm" defaultLabel="Label" radius="primary" use="primary" modifier="base" leadingIcon={SparkTypographyIcon} labels={state} slot={} /> setState([])} size="md" defaultLabel="Label" radius="primary" use="primary" modifier="base" leadingIcon={SparkTypographyIcon} labels={state} slot={} /> setState([])} size="lg" defaultLabel="Label" radius="secondary" use="primary" modifier="base" leadingIcon={SparkTypographyIcon} labels={state} slot={} />
console.log('remove')} slot={
slot
} /> slot
} /> slot} />
Rt Chips checkbox
setChecked(value)} /> setChecked(value)} /> setChecked(value)} /> setChecked(value)} /> setChecked(value)} disabled /> setChecked(value)} disabled />
); }