/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/components/src/range-control/mark.tsx
47 строк
904 B
Marco Ciampini
ESLint: Replace strict config with bulk suppressions (#81248)
07 авг 2026, 14:34
Не верифицирован
07 авг 2026, 14:34
7f43eaf
Код
Авторство
О чём код?
import clsx from 'clsx'; import { Mark, MarkLabel } from './styles/range-control-styles'; import type { RangeMarkProps } from './types'; import type { WordPressComponentProps } from '../context'; export default function RangeMark( props: WordPressComponentProps< RangeMarkProps, 'span' > ) { const { className, isFilled = false, label, style = {}, ...otherProps } = props; const classes = clsx( 'components-range-control__mark', isFilled && 'is-filled', className ); const labelClasses = clsx( 'components-range-control__mark-label', isFilled && 'is-filled' ); return ( <> <Mark { ...otherProps } aria-hidden="true" className={ classes } style={ style } /> { label && ( <MarkLabel aria-hidden="true" className={ labelClasses } isFilled={ isFilled } style={ style } > { label } </MarkLabel> ) } </> ); }