import * as React from 'react';
import { select, boolean, text } from '@storybook/addon-knobs';
import Button from '../button/Button';
import Tooltip, { TooltipPosition, TooltipTheme } from './Tooltip';
import notes from './Tooltip.stories.md';
const addSpacing = (component: JSX.Element) => (
{component}
);
export const positioning = () => {
const positions = Object.values(TooltipPosition);
return addSpacing(
,
);
};
positioning.story = {
name: 'Positioning',
};
export const themes = () => {
const themeOptions = Object.values(TooltipTheme);
return addSpacing(
,
);
};
themes.story = {
name: 'Themes',
};
export const withCloseButton = () => {
const positions = Object.values(TooltipPosition);
const themeOptions = Object.values(TooltipTheme);
return addSpacing(
,
);
};
withCloseButton.story = {
name: 'With close button',
};
export const isShown = () =>
addSpacing(
,
);
isShown.story = {
name: 'Force show and hide',
};
export const withOffset = () => {
const positions = Object.values(TooltipPosition);
return addSpacing(
,
);
};
withOffset.story = {
name: 'With offset',
};
export const withDisabled = () =>
addSpacing(
,
);
withDisabled.story = {
name: 'With disabled tooltip',
};
export const attachedToDisabledButton = () =>
addSpacing(
,
);
attachedToDisabledButton.story = {
name: 'Attached to disabled button',
};
export const withLongText = () =>
addSpacing(
,
);
withLongText.story = {
name: 'With long tooltip text',
};
export default {
title: 'Components|Tooltip',
component: Tooltip,
parameters: {
notes,
},
};