diff --git a/packages/plasma-b2c/src/components/Tooltip/Tooltip.stories.tsx b/packages/plasma-b2c/src/components/Tooltip/Tooltip.stories.tsx index 841336c8c4..effe9e06b0 100644 --- a/packages/plasma-b2c/src/components/Tooltip/Tooltip.stories.tsx +++ b/packages/plasma-b2c/src/components/Tooltip/Tooltip.stories.tsx @@ -31,6 +31,22 @@ const placements: Array = [ 'auto', ]; +const disabledProps = [ + 'target', + 'children', + 'text', + 'opened', + 'isOpen', + 'isVisible', + 'offset', + 'frame', + 'view', + 'zIndex', + 'minWidth', + 'maxWidth', + 'contentLeft', + 'onDismiss', +]; const meta: Meta = { title: 'Overlay/Tooltip', decorators: [InSpacingDecorator], @@ -80,28 +96,15 @@ export const Default: StoryObj = { type: 'select', }, }, - ...disableProps([ - 'target', - 'children', - 'text', - 'opened', - 'isOpen', - 'isVisible', - 'placement', - 'offset', - 'frame', - 'view', - 'zIndex', - 'minWidth', - 'maxWidth', - 'contentLeft', - 'onDismiss', - ]), + ...disableProps([...disabledProps, 'placement']), }, args: { - size: 'm', + maxWidth: 10, + minWidth: 3, hasArrow: true, usePortal: false, + animated: true, + size: 'm', }, render: (args) => , }; @@ -155,20 +158,7 @@ export const Live: StoryObj = { type: 'select', }, }, - ...disableProps([ - 'target', - 'children', - 'text', - 'opened', - 'isOpen', - 'isVisible', - 'offset', - 'frame', - 'view', - 'zIndex', - 'contentLeft', - 'onDismiss', - ]), + ...disableProps(disabledProps), }, args: { placement: 'bottom', diff --git a/packages/plasma-new-hope/src/examples/plasma_b2c/components/Tooltip/Tooltip.stories.tsx b/packages/plasma-new-hope/src/examples/plasma_b2c/components/Tooltip/Tooltip.stories.tsx index d8e22af87e..6729dffd8f 100644 --- a/packages/plasma-new-hope/src/examples/plasma_b2c/components/Tooltip/Tooltip.stories.tsx +++ b/packages/plasma-new-hope/src/examples/plasma_b2c/components/Tooltip/Tooltip.stories.tsx @@ -31,6 +31,23 @@ const placements: Array = [ 'auto', ]; +const disabledProps = [ + 'target', + 'children', + 'text', + 'opened', + 'isOpen', + 'isVisible', + 'offset', + 'frame', + 'view', + 'zIndex', + 'minWidth', + 'maxWidth', + 'contentLeft', + 'onDismiss', +]; + const meta: Meta = { title: 'b2c/Overlay/Tooltip', decorators: [WithTheme], @@ -52,7 +69,7 @@ const StyledGrid = styled.div` padding: 3.5rem; `; -const StoryDefault = ({ size }: TooltipProps) => { +const StoryDefault = (args: TooltipProps) => { return ( { Btn} placement="left" - size={size} + {...args} opened hasArrow text="left" @@ -68,7 +85,7 @@ const StoryDefault = ({ size }: TooltipProps) => { /> } placement="top-start" - size={size} + {...args} opened hasArrow text="top-start" @@ -77,7 +94,7 @@ const StoryDefault = ({ size }: TooltipProps) => { Btn} placement="top" - size={size} + {...args} opened hasArrow text="top" @@ -88,7 +105,7 @@ const StoryDefault = ({ size }: TooltipProps) => { Btn} placement="right" - size={size} + {...args} opened hasArrow text="right" @@ -96,7 +113,7 @@ const StoryDefault = ({ size }: TooltipProps) => { /> } placement="top-end" - size={size} + {...args} opened hasArrow text="top-end" @@ -105,7 +122,7 @@ const StoryDefault = ({ size }: TooltipProps) => { Btn} placement="bottom-start" - size={size} + {...args} opened hasArrow text="bottom-start" @@ -114,7 +131,7 @@ const StoryDefault = ({ size }: TooltipProps) => { Btn} placement="bottom" - size={size} + {...args} opened hasArrow text="bottom" @@ -123,7 +140,7 @@ const StoryDefault = ({ size }: TooltipProps) => { Btn} placement="bottom-end" - size={size} + {...args} opened hasArrow text="bottom-end" @@ -141,8 +158,14 @@ export const Default: StoryObj = { type: 'select', }, }, + ...disableProps([...disabledProps, 'placement']), }, args: { + maxWidth: 10, + minWidth: 3, + hasArrow: true, + usePortal: false, + animated: true, size: 'm', }, render: (args) => , @@ -208,10 +231,6 @@ export const Live: StoryObj = { maxWidth: 10, minWidth: 3, hasArrow: true, - trigger: 'hover', - hoverTimeout: 300, - closeOnOverlayClick: true, - closeOnEsc: true, size: 'm', }, render: (args) => , diff --git a/packages/plasma-new-hope/src/examples/plasma_web/components/Tooltip/Tooltip.stories.tsx b/packages/plasma-new-hope/src/examples/plasma_web/components/Tooltip/Tooltip.stories.tsx index 77174627f9..c05ecce4ec 100644 --- a/packages/plasma-new-hope/src/examples/plasma_web/components/Tooltip/Tooltip.stories.tsx +++ b/packages/plasma-new-hope/src/examples/plasma_web/components/Tooltip/Tooltip.stories.tsx @@ -1,6 +1,7 @@ import React, { useState } from 'react'; import { styled } from '@linaria/react'; import type { StoryObj, Meta } from '@storybook/react'; +import { disableProps } from '@salutejs/plasma-sb-utils'; import { WithTheme } from '../../../_helpers'; import { Button } from '../Button/Button'; @@ -30,6 +31,23 @@ const placements: Array = [ 'auto', ]; +const disabledProps = [ + 'target', + 'children', + 'text', + 'opened', + 'isOpen', + 'isVisible', + 'offset', + 'frame', + 'view', + 'zIndex', + 'minWidth', + 'maxWidth', + 'contentLeft', + 'onDismiss', +]; + const meta: Meta = { title: 'web/Overlay/Tooltip', decorators: [WithTheme], @@ -48,7 +66,7 @@ const StyledGrid = styled.div` padding: 3.5rem; `; -const StoryDefault = ({ size }: TooltipProps) => { +const StoryDefault = (args: TooltipProps) => { return ( { Btn} placement="left" - size={size} + {...args} opened hasArrow text="left" @@ -64,7 +82,7 @@ const StoryDefault = ({ size }: TooltipProps) => { /> } placement="top-start" - size={size} + {...args} opened hasArrow text="top-start" @@ -73,7 +91,7 @@ const StoryDefault = ({ size }: TooltipProps) => { Btn} placement="top" - size={size} + {...args} opened hasArrow text="top" @@ -84,7 +102,7 @@ const StoryDefault = ({ size }: TooltipProps) => { Btn} placement="right" - size={size} + {...args} opened hasArrow text="right" @@ -92,7 +110,7 @@ const StoryDefault = ({ size }: TooltipProps) => { /> } placement="top-end" - size={size} + {...args} opened hasArrow text="top-end" @@ -101,7 +119,7 @@ const StoryDefault = ({ size }: TooltipProps) => { Btn} placement="bottom-start" - size={size} + {...args} opened hasArrow text="bottom-start" @@ -110,7 +128,7 @@ const StoryDefault = ({ size }: TooltipProps) => { Btn} placement="bottom" - size={size} + {...args} opened hasArrow text="bottom" @@ -119,7 +137,7 @@ const StoryDefault = ({ size }: TooltipProps) => { Btn} placement="bottom-end" - size={size} + {...args} opened hasArrow text="bottom-end" @@ -137,8 +155,14 @@ export const Default: StoryObj = { type: 'select', }, }, + ...disableProps([...disabledProps, 'placement']), }, args: { + maxWidth: 10, + minWidth: 3, + hasArrow: true, + usePortal: false, + animated: true, size: 'm', }, render: (args) => , @@ -193,12 +217,15 @@ export const Live: StoryObj = { type: 'select', }, }, + ...disableProps(disabledProps), }, args: { placement: 'bottom', maxWidth: 10, minWidth: 3, hasArrow: true, + usePortal: false, + animated: true, size: 'm', }, render: (args) => , diff --git a/packages/plasma-web/src/components/Tooltip/Tooltip.stories.tsx b/packages/plasma-web/src/components/Tooltip/Tooltip.stories.tsx index 8c3cce3dde..772361ae83 100644 --- a/packages/plasma-web/src/components/Tooltip/Tooltip.stories.tsx +++ b/packages/plasma-web/src/components/Tooltip/Tooltip.stories.tsx @@ -31,6 +31,22 @@ const placements: Array = [ 'auto', ]; +const disabledProps = [ + 'target', + 'children', + 'text', + 'opened', + 'isOpen', + 'isVisible', + 'offset', + 'frame', + 'view', + 'zIndex', + 'minWidth', + 'maxWidth', + 'contentLeft', + 'onDismiss', +]; const meta: Meta = { title: 'Overlay/Tooltip', decorators: [InSpacingDecorator], @@ -80,28 +96,15 @@ export const Default: StoryObj = { type: 'select', }, }, - ...disableProps([ - 'target', - 'children', - 'text', - 'opened', - 'isOpen', - 'isVisible', - 'placement', - 'offset', - 'frame', - 'view', - 'zIndex', - 'minWidth', - 'maxWidth', - 'contentLeft', - 'onDismiss', - ]), + ...disableProps([...disabledProps, 'placement']), }, args: { - size: 'm', + maxWidth: 10, + minWidth: 3, hasArrow: true, usePortal: false, + animated: true, + size: 'm', }, render: (args) => , }; @@ -156,20 +159,7 @@ export const Live: StoryObj = { type: 'select', }, }, - ...disableProps([ - 'target', - 'children', - 'text', - 'opened', - 'isOpen', - 'isVisible', - 'offset', - 'frame', - 'view', - 'zIndex', - 'contentLeft', - 'onDismiss', - ]), + ...disableProps(disabledProps), }, args: { placement: 'bottom', diff --git a/packages/sdds-cs/src/components/Tooltip/Tooltip.stories.tsx b/packages/sdds-cs/src/components/Tooltip/Tooltip.stories.tsx index 1353286449..45906c6a86 100644 --- a/packages/sdds-cs/src/components/Tooltip/Tooltip.stories.tsx +++ b/packages/sdds-cs/src/components/Tooltip/Tooltip.stories.tsx @@ -29,6 +29,23 @@ const placements: Array = [ 'auto', ]; +const disabledProps = [ + 'target', + 'children', + 'text', + 'opened', + 'isOpen', + 'isVisible', + 'offset', + 'frame', + 'view', + 'zIndex', + 'minWidth', + 'maxWidth', + 'contentLeft', + 'onDismiss', + 'size', +]; const meta: Meta = { title: 'Overlay/Tooltip', decorators: [InSpacingDecorator], @@ -72,29 +89,15 @@ const StoryDefault = (props: Pick = { argTypes: { - ...disableProps([ - 'target', - 'children', - 'text', - 'opened', - 'isOpen', - 'isVisible', - 'placement', - 'offset', - 'frame', - 'view', - 'size', - 'zIndex', - 'minWidth', - 'maxWidth', - 'contentLeft', - 'onDismiss', - ]), + ...disableProps([...disabledProps, 'placement']), }, args: { - size: 's', + maxWidth: 10, + minWidth: 3, hasArrow: true, usePortal: false, + animated: true, + size: 's', }, render: (args) => , }; @@ -134,21 +137,7 @@ export const Live: StoryObj = { }, mapping: placements, }, - ...disableProps([ - 'target', - 'children', - 'text', - 'opened', - 'isOpen', - 'isVisible', - 'offset', - 'frame', - 'view', - 'zIndex', - 'contentLeft', - 'onDismiss', - 'size', - ]), + ...disableProps(disabledProps), }, args: { placement: 'bottom', diff --git a/packages/sdds-dfa/src/components/Tooltip/Tooltip.stories.tsx b/packages/sdds-dfa/src/components/Tooltip/Tooltip.stories.tsx index 318e0236b3..81fb1fa827 100644 --- a/packages/sdds-dfa/src/components/Tooltip/Tooltip.stories.tsx +++ b/packages/sdds-dfa/src/components/Tooltip/Tooltip.stories.tsx @@ -29,6 +29,22 @@ const placements: Array = [ 'auto', ]; +const disabledProps = [ + 'target', + 'children', + 'text', + 'opened', + 'isOpen', + 'isVisible', + 'offset', + 'frame', + 'view', + 'zIndex', + 'minWidth', + 'maxWidth', + 'contentLeft', + 'onDismiss', +]; const meta: Meta = { title: 'Overlay/Tooltip', decorators: [InSpacingDecorator], @@ -78,28 +94,15 @@ export const Default: StoryObj = { type: 'select', }, }, - ...disableProps([ - 'target', - 'children', - 'text', - 'opened', - 'isOpen', - 'isVisible', - 'placement', - 'offset', - 'frame', - 'view', - 'zIndex', - 'minWidth', - 'maxWidth', - 'contentLeft', - 'onDismiss', - ]), + ...disableProps([...disabledProps, 'placement']), }, args: { - size: 'm', + maxWidth: 10, + minWidth: 3, hasArrow: true, usePortal: false, + animated: true, + size: 'm', }, render: (args) => , }; @@ -145,20 +148,7 @@ export const Live: StoryObj = { type: 'select', }, }, - ...disableProps([ - 'target', - 'children', - 'text', - 'opened', - 'isOpen', - 'isVisible', - 'offset', - 'frame', - 'view', - 'zIndex', - 'contentLeft', - 'onDismiss', - ]), + ...disableProps(disabledProps), }, args: { placement: 'bottom', diff --git a/packages/sdds-finportal/src/components/Tooltip/Tooltip.stories.tsx b/packages/sdds-finportal/src/components/Tooltip/Tooltip.stories.tsx index 318e0236b3..81fb1fa827 100644 --- a/packages/sdds-finportal/src/components/Tooltip/Tooltip.stories.tsx +++ b/packages/sdds-finportal/src/components/Tooltip/Tooltip.stories.tsx @@ -29,6 +29,22 @@ const placements: Array = [ 'auto', ]; +const disabledProps = [ + 'target', + 'children', + 'text', + 'opened', + 'isOpen', + 'isVisible', + 'offset', + 'frame', + 'view', + 'zIndex', + 'minWidth', + 'maxWidth', + 'contentLeft', + 'onDismiss', +]; const meta: Meta = { title: 'Overlay/Tooltip', decorators: [InSpacingDecorator], @@ -78,28 +94,15 @@ export const Default: StoryObj = { type: 'select', }, }, - ...disableProps([ - 'target', - 'children', - 'text', - 'opened', - 'isOpen', - 'isVisible', - 'placement', - 'offset', - 'frame', - 'view', - 'zIndex', - 'minWidth', - 'maxWidth', - 'contentLeft', - 'onDismiss', - ]), + ...disableProps([...disabledProps, 'placement']), }, args: { - size: 'm', + maxWidth: 10, + minWidth: 3, hasArrow: true, usePortal: false, + animated: true, + size: 'm', }, render: (args) => , }; @@ -145,20 +148,7 @@ export const Live: StoryObj = { type: 'select', }, }, - ...disableProps([ - 'target', - 'children', - 'text', - 'opened', - 'isOpen', - 'isVisible', - 'offset', - 'frame', - 'view', - 'zIndex', - 'contentLeft', - 'onDismiss', - ]), + ...disableProps(disabledProps), }, args: { placement: 'bottom', diff --git a/packages/sdds-insol/src/components/Tooltip/Tooltip.stories.tsx b/packages/sdds-insol/src/components/Tooltip/Tooltip.stories.tsx index 318e0236b3..81fb1fa827 100644 --- a/packages/sdds-insol/src/components/Tooltip/Tooltip.stories.tsx +++ b/packages/sdds-insol/src/components/Tooltip/Tooltip.stories.tsx @@ -29,6 +29,22 @@ const placements: Array = [ 'auto', ]; +const disabledProps = [ + 'target', + 'children', + 'text', + 'opened', + 'isOpen', + 'isVisible', + 'offset', + 'frame', + 'view', + 'zIndex', + 'minWidth', + 'maxWidth', + 'contentLeft', + 'onDismiss', +]; const meta: Meta = { title: 'Overlay/Tooltip', decorators: [InSpacingDecorator], @@ -78,28 +94,15 @@ export const Default: StoryObj = { type: 'select', }, }, - ...disableProps([ - 'target', - 'children', - 'text', - 'opened', - 'isOpen', - 'isVisible', - 'placement', - 'offset', - 'frame', - 'view', - 'zIndex', - 'minWidth', - 'maxWidth', - 'contentLeft', - 'onDismiss', - ]), + ...disableProps([...disabledProps, 'placement']), }, args: { - size: 'm', + maxWidth: 10, + minWidth: 3, hasArrow: true, usePortal: false, + animated: true, + size: 'm', }, render: (args) => , }; @@ -145,20 +148,7 @@ export const Live: StoryObj = { type: 'select', }, }, - ...disableProps([ - 'target', - 'children', - 'text', - 'opened', - 'isOpen', - 'isVisible', - 'offset', - 'frame', - 'view', - 'zIndex', - 'contentLeft', - 'onDismiss', - ]), + ...disableProps(disabledProps), }, args: { placement: 'bottom', diff --git a/packages/sdds-serv/src/components/Tooltip/Tooltip.stories.tsx b/packages/sdds-serv/src/components/Tooltip/Tooltip.stories.tsx index 318e0236b3..81fb1fa827 100644 --- a/packages/sdds-serv/src/components/Tooltip/Tooltip.stories.tsx +++ b/packages/sdds-serv/src/components/Tooltip/Tooltip.stories.tsx @@ -29,6 +29,22 @@ const placements: Array = [ 'auto', ]; +const disabledProps = [ + 'target', + 'children', + 'text', + 'opened', + 'isOpen', + 'isVisible', + 'offset', + 'frame', + 'view', + 'zIndex', + 'minWidth', + 'maxWidth', + 'contentLeft', + 'onDismiss', +]; const meta: Meta = { title: 'Overlay/Tooltip', decorators: [InSpacingDecorator], @@ -78,28 +94,15 @@ export const Default: StoryObj = { type: 'select', }, }, - ...disableProps([ - 'target', - 'children', - 'text', - 'opened', - 'isOpen', - 'isVisible', - 'placement', - 'offset', - 'frame', - 'view', - 'zIndex', - 'minWidth', - 'maxWidth', - 'contentLeft', - 'onDismiss', - ]), + ...disableProps([...disabledProps, 'placement']), }, args: { - size: 'm', + maxWidth: 10, + minWidth: 3, hasArrow: true, usePortal: false, + animated: true, + size: 'm', }, render: (args) => , }; @@ -145,20 +148,7 @@ export const Live: StoryObj = { type: 'select', }, }, - ...disableProps([ - 'target', - 'children', - 'text', - 'opened', - 'isOpen', - 'isVisible', - 'offset', - 'frame', - 'view', - 'zIndex', - 'contentLeft', - 'onDismiss', - ]), + ...disableProps(disabledProps), }, args: { placement: 'bottom', diff --git a/website/plasma-b2c-docs/docs/components/Tooltip.mdx b/website/plasma-b2c-docs/docs/components/Tooltip.mdx index ce59cfd90c..c15bf5639c 100644 --- a/website/plasma-b2c-docs/docs/components/Tooltip.mdx +++ b/website/plasma-b2c-docs/docs/components/Tooltip.mdx @@ -18,13 +18,28 @@ import { PropsTable, Description, StorybookLink } from '@site/src/components'; ```tsx live import React from 'react'; -import { Tooltip } from '@salutejs/plasma-b2c'; -import { IconApps } from '@salutejs/plasma-icons'; +import { Tooltip, Button } from '@salutejs/plasma-b2c'; export function App() { return ( -
- )} text="Высокое качество воспроизведения" placement="bottom" hasArrow isOpen /> +
+ Btn} placement="left" opened text="left" />} + placement="top-start" + opened + text="top-start" + view="default" + /> + Btn} placement="top" opened text="top" /> + Btn} placement="right" opened text="right" />} + placement="top-end" + opened + text="top-end" + /> + Btn} placement="bottom-start" opened text="bottom-start" /> + Btn} placement="bottom" opened text="bottom" /> + Btn} placement="bottom-end" opened text="bottom-end" />
); } diff --git a/website/plasma-web-docs/docs/components/Tooltip.mdx b/website/plasma-web-docs/docs/components/Tooltip.mdx index 9a4679d5ea..3594391fd7 100644 --- a/website/plasma-web-docs/docs/components/Tooltip.mdx +++ b/website/plasma-web-docs/docs/components/Tooltip.mdx @@ -18,13 +18,28 @@ import { PropsTable, Description, StorybookLink } from '@site/src/components'; ```tsx live import React from 'react'; -import { Tooltip } from '@salutejs/plasma-web'; -import { IconApps } from '@salutejs/plasma-icons'; +import { Tooltip, Button } from '@salutejs/plasma-web'; export function App() { return ( -
- )} text="Высокое качество воспроизведения" placement="bottom" hasArrow opened /> +
+ Btn} placement="left" opened text="left" />} + placement="top-start" + opened + text="top-start" + view="default" + /> + Btn} placement="top" opened text="top" /> + Btn} placement="right" opened text="right" />} + placement="top-end" + opened + text="top-end" + /> + Btn} placement="bottom-start" opened text="bottom-start" /> + Btn} placement="bottom" opened text="bottom" /> + Btn} placement="bottom-end" opened text="bottom-end" />
); } diff --git a/website/sdds-cs-docs/docs/components/Tooltip.mdx b/website/sdds-cs-docs/docs/components/Tooltip.mdx index 624aab95be..e69fac4c3c 100644 --- a/website/sdds-cs-docs/docs/components/Tooltip.mdx +++ b/website/sdds-cs-docs/docs/components/Tooltip.mdx @@ -17,13 +17,28 @@ import { PropsTable, Description } from '@site/src/components'; ```tsx live import React from 'react'; -import { Tooltip } from '@salutejs/sdds-cs'; -import { IconApps } from '@salutejs/plasma-icons'; +import { Tooltip, Button } from '@salutejs/sdds-cs'; export function App() { return ( -
- )} text="Высокое качество воспроизведения" placement="bottom" hasArrow opened /> +
+ Btn} placement="left" opened text="left" />} + placement="top-start" + opened + text="top-start" + view="default" + /> + Btn} placement="top" opened text="top" /> + Btn} placement="right" opened text="right" />} + placement="top-end" + opened + text="top-end" + /> + Btn} placement="bottom-start" opened text="bottom-start" /> + Btn} placement="bottom" opened text="bottom" /> + Btn} placement="bottom-end" opened text="bottom-end" />
); } diff --git a/website/sdds-dfa-docs/docs/components/Tooltip.mdx b/website/sdds-dfa-docs/docs/components/Tooltip.mdx index c680c0a973..2c4316f7d8 100644 --- a/website/sdds-dfa-docs/docs/components/Tooltip.mdx +++ b/website/sdds-dfa-docs/docs/components/Tooltip.mdx @@ -17,13 +17,28 @@ import { PropsTable, Description } from '@site/src/components'; ```tsx live import React from 'react'; -import { Tooltip } from '@salutejs/sdds-dfa'; -import { IconApps } from '@salutejs/plasma-icons'; +import { Tooltip, Button } from '@salutejs/sdds-dfa'; export function App() { return ( -
- )} text="Высокое качество воспроизведения" placement="bottom" hasArrow opened /> +
+ Btn} placement="left" opened text="left" />} + placement="top-start" + opened + text="top-start" + view="default" + /> + Btn} placement="top" opened text="top" /> + Btn} placement="right" opened text="right" />} + placement="top-end" + opened + text="top-end" + /> + Btn} placement="bottom-start" opened text="bottom-start" /> + Btn} placement="bottom" opened text="bottom" /> + Btn} placement="bottom-end" opened text="bottom-end" />
); } diff --git a/website/sdds-insol-docs/docs/components/Tooltip.mdx b/website/sdds-insol-docs/docs/components/Tooltip.mdx index 4951b76782..b2454f2bc5 100644 --- a/website/sdds-insol-docs/docs/components/Tooltip.mdx +++ b/website/sdds-insol-docs/docs/components/Tooltip.mdx @@ -17,13 +17,28 @@ import { PropsTable, Description } from '@site/src/components'; ```tsx live import React from 'react'; -import { Tooltip } from '@salutejs/sdds-insol'; -import { IconApps } from '@salutejs/plasma-icons'; +import { Tooltip, Button } from '@salutejs/sdds-insol'; export function App() { return ( -
- )} text="Высокое качество воспроизведения" placement="bottom" hasArrow opened /> +
+ Btn} placement="left" opened text="left" />} + placement="top-start" + opened + text="top-start" + view="default" + /> + Btn} placement="top" opened text="top" /> + Btn} placement="right" opened text="right" />} + placement="top-end" + opened + text="top-end" + /> + Btn} placement="bottom-start" opened text="bottom-start" /> + Btn} placement="bottom" opened text="bottom" /> + Btn} placement="bottom-end" opened text="bottom-end" />
); } diff --git a/website/sdds-serv-docs/docs/components/Tooltip.mdx b/website/sdds-serv-docs/docs/components/Tooltip.mdx index 971d080329..37cd5a6065 100644 --- a/website/sdds-serv-docs/docs/components/Tooltip.mdx +++ b/website/sdds-serv-docs/docs/components/Tooltip.mdx @@ -17,13 +17,28 @@ import { PropsTable, Description } from '@site/src/components'; ```tsx live import React from 'react'; -import { Tooltip } from '@salutejs/sdds-serv'; -import { IconApps } from '@salutejs/plasma-icons'; +import { Tooltip, Button } from '@salutejs/sdds-serv'; export function App() { return ( -
- )} text="Высокое качество воспроизведения" placement="bottom" hasArrow opened /> +
+ Btn} placement="left" opened text="left" />} + placement="top-start" + opened + text="top-start" + view="default" + /> + Btn} placement="top" opened text="top" /> + Btn} placement="right" opened text="right" />} + placement="top-end" + opened + text="top-end" + /> + Btn} placement="bottom-start" opened text="bottom-start" /> + Btn} placement="bottom" opened text="bottom" /> + Btn} placement="bottom-end" opened text="bottom-end" />
); }