Skip to content

Commit

Permalink
feat(storybook): tooltip doc & stories
Browse files Browse the repository at this point in the history
Signed-off-by: aurore.stagnol <[email protected]>
  • Loading branch information
aurore.stagnol authored and dpellier committed Jul 29, 2024
1 parent 2aedc68 commit 234debf
Show file tree
Hide file tree
Showing 12 changed files with 255 additions and 288 deletions.

This file was deleted.

This file was deleted.

39 changes: 39 additions & 0 deletions packages/ods/src/components/tooltip/documentation/spec.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<<<<<<< HEAD
## OdsTooltip
### Properties
| Property | Type | Required | Default value |
Expand All @@ -16,6 +17,44 @@
**odsShow**(): `EventEmitter<void>`
### Enums
#### ODS_TOOLTIP_POSITION
=======
## Properties
### position

**position**: [`left` | `top` | `bottom` | `right` | `bottom-end` | `bottom-start` | `left-end` | `left-start` | `right-end` | `right-start` | `top-end` | `top-start`] = `ODS_TOOLTIP_POSITION.top`


### triggerId

**triggerId**: [_string_]


### withArrow

`Optional` **withArrow**: [_boolean_]


## Methods
### hide

**hide**(): `Promise`<_void_>



#### Returns
`Promise`<_void_>
### show

**show**(): `Promise`<_void_>



#### Returns
`Promise`<_void_>

## Enums
### Enumeration: ODS_TOOLTIP_POSITION
>>>>>>> 396769406 (feat(storybook): tooltip doc & stories)
**bottom** = `"bottom"`

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import * as IconStories from './icon.stories';

# Overview

Icon is a visual context used to represent a command, navigation, status or common action:
Icon is a visual context used to represent a command, navigation, status or common action.

<Canvas of={ IconStories.Demo } sourceState='none' />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import * as SpinnerStories from './spinner.stories';

# Overview

A visual indicator that a process is happening in the background but the interface is not yet ready for interaction.

<Canvas of={ SpinnerStories.Default } sourceState='none' />

<div>
Expand Down
2 changes: 2 additions & 0 deletions packages/storybook/stories/components/text/documentation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import * as TextStories from './text.stories';

# Overview

The text component is used to display text with a specific font & style.

<Canvas of={ TextStories.Default } sourceState='none' />

<div>
Expand Down
27 changes: 19 additions & 8 deletions packages/storybook/stories/components/tooltip/documentation.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { Meta, Markdown } from '@storybook/blocks';
import OverviewTooltip from '@ovhcloud/ods-components/src/components/tooltip/documentation/overview-tooltip.mdx';
import SpecificationsTooltip from '@ovhcloud/ods-components/src/components/tooltip/documentation/specifications/spec.md?raw';
import StyleCustomizationTooltip from '@ovhcloud/ods-components/src/components/tooltip/documentation/style-customization-tooltip.mdx';
import Usage from '@ovhcloud/ods-components/src/components/tooltip/documentation/usage-guidelines/usage.mdx';
import { Canvas, Meta, Markdown } from '@storybook/blocks';
import SpecificationsTooltip from '@ovhcloud/ods-components/src/components/tooltip/documentation/spec.md?raw';
import { Banner } from '../../Banner';
import * as TooltipStories from './tooltip.stories';

Expand All @@ -12,16 +9,30 @@ import * as TooltipStories from './tooltip.stories';

# Overview

<OverviewTooltip />
<Canvas of={ TooltipStories.Overview } sourceState='none' />

<div>
<a href="#"
target="_blank">
ZEROHEIGHT - SKELETON DESIGN GUIDELINES &nbsp;
</a>
</div>

# API

<Markdown> { SpecificationsTooltip } </Markdown>

# Style customization

<StyleCustomizationTooltip />
You can update the tooltip content by directly updating the slot element.

<Canvas of={ TooltipStories.CustomCSS } sourceState='shown' />

# Examples
## Default

<Canvas of={ TooltipStories.Default } sourceState='shown' />

## With an arrow tip

<Usage />
<Canvas of={ TooltipStories.ArrowTip } sourceState='shown' />
Loading

0 comments on commit 234debf

Please sign in to comment.