Skip to content

Commit

Permalink
docs: expose selectorPrimaryFocus knobs
Browse files Browse the repository at this point in the history
  • Loading branch information
emyarod committed Feb 28, 2020
1 parent 9f5938c commit a582b46
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ const props = {
iconDescription: text('Icon description (iconDescription)', ''),
flipped: boolean('Flipped (flipped)', false),
light: boolean('Light (light)', false),
selectorPrimaryFocus: text(
'Primary focus element selector (selectorPrimaryFocus)',
''
),
onClick: action('onClick'),
onFocus: action('onFocus'),
onKeyDown: action('onKeyDown'),
Expand Down
16 changes: 16 additions & 0 deletions packages/react/src/components/Tooltip/Tooltip-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,30 @@ const props = {
direction: select('Tooltip direction (direction)', directions, 'bottom'),
triggerText: text('Trigger text (triggerText)', 'Tooltip label'),
tabIndex: number('Tab index (tabIndex in <Tooltip>)', 0),
selectorPrimaryFocus: text(
'Primary focus element selector (selectorPrimaryFocus)',
''
),
}),
withoutIcon: () => ({
showIcon: false,
direction: select('Tooltip direction (direction)', directions, 'bottom'),
triggerText: text('Trigger text (triggerText)', 'Tooltip label'),
tabIndex: number('Tab index (tabIndex in <Tooltip>)', 0),
selectorPrimaryFocus: text(
'Primary focus element selector (selectorPrimaryFocus)',
''
),
}),
customIcon: () => ({
showIcon: true,
direction: select('Tooltip direction (direction)', directions, 'bottom'),
triggerText: text('Trigger text (triggerText)', 'Tooltip label'),
tabIndex: number('Tab index (tabIndex in <Tooltip>)', 0),
selectorPrimaryFocus: text(
'Primary focus element selector (selectorPrimaryFocus)',
''
),
renderIcon: React.forwardRef((props, ref) => (
<div ref={ref}>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
Expand All @@ -52,6 +64,10 @@ const props = {
direction: select('Tooltip direction (direction)', directions, 'bottom'),
iconDescription: 'Helpful Information',
tabIndex: number('Tab index (tabIndex in <Tooltip>)', 0),
selectorPrimaryFocus: text(
'Primary focus element selector (selectorPrimaryFocus)',
''
),
renderIcon: OverflowMenuVertical16,
}),
};
Expand Down

0 comments on commit a582b46

Please sign in to comment.