UNPKG

@yandex/ui

Version:

Yandex UI components

16 lines (15 loc) 1.12 kB
import React, { useRef } from 'react'; import { Button } from '@yandex-lego/components/Button/desktop/bundle'; import { Text } from '@yandex-lego/components/Text/bundle'; import { Icon } from '@yandex-lego/components/Icon/bundle'; import { Dropdown } from '@yandex-lego/components/Dropdown/desktop'; import { SampleMenu } from './SampleMenu'; export var Split = function () { var anchor = useRef(null); return (React.createElement(React.Fragment, null, React.createElement(Text, { as: "h2", typography: "headline-l" }, "\u041F\u0440\u0438\u043C\u0435\u0440 \u0441\u043E SplitButton"), React.createElement("div", null, React.createElement(Button, { view: "link", size: "s", pin: "round-brick" }, "Dropdown"), React.createElement(Dropdown, { direction: "top-start", view: "default", hasTail: true, content: React.createElement(SampleMenu, null) }, React.createElement(Button, { innerRef: anchor, view: "link", size: "s", pin: "clear-round", icon: function (className) { return React.createElement(Icon, { type: "arrow", className: className }); } }))))); };