diff --git a/src/components/SharePopover/README.md b/src/components/SharePopover/README.md index ec47589a..89290cc6 100644 --- a/src/components/SharePopover/README.md +++ b/src/components/SharePopover/README.md @@ -4,22 +4,23 @@ Sharing component ### PropTypes -| Property | Type | Required | Default | Description | -| :--------------- | :-------------------- | :------- | :--------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| url | `String` | ✔ | | share link | -| title | `String` | | | link title | -| text | `String` | | | link text | -| shareOptions | `Array` | | `[]` | share options list | -| withCopyLink | `Boolean` | | `true` | display copy button | -| useWebShareApi | `Boolean` | | `false` | [Web Share API](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share) usage setting. If turned on default share dialog will be shown (if bbrowser supports it) | -| placement | `Array` | | `['bottom-end']` | tooltip openening direction | -| openByHover | `Boolean` | | `true` | should open tooltip with hover | -| autoclosable | `Boolean` | | `true` | should close tooltip when cursor is outside | -| closeDelay | `Number` | | `300` | delay before tooltip will be hidden when cursor is otside | -| iconSize | `Number` | | | icon-control size | -| iconClass | `String` | | | icon-control mixin | -| tooltipClassName | `String` | | | tooltip mixin | -| className | `String` | | | css class for control | +| Property | Type | Required | Default | Description | +| :---------------------- | :-------------------- | :------- | :--------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| url | `String` | ✔ | | share link | +| title | `String` | | | link title | +| text | `String` | | | link text | +| shareOptions | `Array` | | `[]` | share options list | +| withCopyLink | `Boolean` | | `true` | display copy button | +| useWebShareApi | `Boolean` | | `false` | [Web Share API](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share) usage setting. If turned on default share dialog will be shown (if bbrowser supports it) | +| placement | `Array` | | `['bottom-end']` | tooltip openening direction | +| openByHover | `Boolean` | | `true` | should open tooltip with hover | +| autoclosable | `Boolean` | | `true` | should close tooltip when cursor is outside | +| closeDelay | `Number` | | `300` | delay before tooltip will be hidden when cursor is otside | +| iconSize | `Number` | | | icon-control size | +| iconClass | `String` | | | icon-control mixin | +| tooltipClassName | `String` | | | tooltip mixin | +| tooltipContentClassName | `String` | | | tooltip content mixin | +| className | `String` | | | css class for control | ### Examples diff --git a/src/components/SharePopover/SharePopover.scss b/src/components/SharePopover/SharePopover.scss index 06690686..4c43d010 100644 --- a/src/components/SharePopover/SharePopover.scss +++ b/src/components/SharePopover/SharePopover.scss @@ -11,7 +11,8 @@ $block: '.#{variables.$ns}share-popover'; padding: 8px; } - &__tooltip-content { + // for guaranteed popover style override + #{$block} &__tooltip-content { max-width: none; } diff --git a/src/components/SharePopover/SharePopover.tsx b/src/components/SharePopover/SharePopover.tsx index 8ef9b5a9..cf187b14 100644 --- a/src/components/SharePopover/SharePopover.tsx +++ b/src/components/SharePopover/SharePopover.tsx @@ -51,6 +51,8 @@ export interface SharePopoverProps extends ShareListProps, Partial { iconSize = sharePopoverDefaultProps.iconSize, iconClass, tooltipClassName, + tooltipContentClassName, switcherClassName, className, direction = sharePopoverDefaultProps.direction, @@ -160,7 +163,7 @@ export const SharePopover = (props: SharePopoverProps) => { content={content} className={b(null, className)} tooltipClassName={b('tooltip', tooltipClassName)} - tooltipContentClassName={b('tooltip-content')} + tooltipContentClassName={b('tooltip-content', tooltipContentClassName)} onClick={handleClick} tooltipId={tooltipId} disablePortal