-
-
Notifications
You must be signed in to change notification settings - Fork 267
/
Copy pathCTooltip.stories.js
41 lines (36 loc) · 1.13 KB
/
CTooltip.stories.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import React from 'react';
import CTooltip from '../src/tooltip/CTooltip'
import CCard from '../src/card/CCard'
import CCardBody from '../src/card/CCardBody'
import CCol from '../src/grid/CCol'
import { text, select, boolean } from '@storybook/addon-knobs';
export default {
title: 'CTooltip'
};
export const basic = () => {
const content = text('Content', 'Popover text', 'Other')
const placementOptions = [
'', 'top-end', 'top', 'top-start',
'bottom-end', 'bottom', 'bottom-start',
'right-start', 'right', 'right-end',
'left-start', 'left', 'left-end'
]
const placement = select('Placement', placementOptions, 'top', 'Other')
const interactive = boolean('Interactive', false, 'Other')
const trigger = text('Trigger', 'mouseenter focus', 'Other')
return <>
<CCol lg="12" xs="12">
<CCard>
<CCardBody>
<CTooltip
content={content}
placement={placement}
interactive={interactive}
>
<a href="#"> Tooltip example </a>
</CTooltip>
</CCardBody>
</CCard>
</CCol>
</>
}