UNPKG

@yandex/ui

Version:

Yandex UI components

33 lines (32 loc) 1.33 kB
import { __assign } from "tslib"; import React from 'react'; import { number, radios, select, text } from '@storybook/addon-knobs'; import { Text } from '@yandex-lego/components/Text/bundle'; import { typographyValues } from './assets'; export var Playground = function () { var weight = select('Weight', ['light', 'regular', 'medium', 'bold'], 'light'); var align = select('Align', ['start', 'center', 'end', 'justify'], 'start'); var overflow = radios('Overflow', { Ellipsis: 'ellipsis', Fade: 'fade', FadeHorizontal: 'fade-horizontal', }); var maxLines = number('Max lines', 1, { range: true, min: 1, max: 5, step: 1, }); var typography = select('Typography', typographyValues, 'body-long-m'); var children = text('Content', 'Миссия Яндекса — помогать людям решать задачи и достигать своих целей в жизни.'); var props = { weight: weight, align: align, typography: typography, children: children, overflow: overflow, maxLines: maxLines, }; return (React.createElement("div", { style: { backgroundColor: 'var(--color-bg-default)' } }, React.createElement(Text, __assign({ as: "div" }, props), children))); };