-
Notifications
You must be signed in to change notification settings - Fork 2.9k
#1302 Callout: Allow callout to specify background color #1403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
b3e5e7e
081dee9
0d854df
e0a6acb
e228ef9
927a765
135adba
8cc6ba7
786f5eb
2f2b872
df08f17
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "changes": [ | ||
| { | ||
| "packageName": "office-ui-fabric-react", | ||
| "comment": "Callout: Allow Callout to specify beak backgroud color.", | ||
| "type": "minor" | ||
| } | ||
| ], | ||
| "email": "jechayav@microsoft.com" | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,6 +34,12 @@ export interface ICalloutProps extends React.Props<Callout | CalloutContent> { | |
| */ | ||
| beakWidth?: number; | ||
|
|
||
| /** | ||
| * The background color of the beak. | ||
| * @default #ffffff | ||
| */ | ||
| beakColor?: string; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This really seems like a very weird thing to me. Wouldn't we want to define the entire background color of the callout and make the background and beak match? Why specifically the beak, why "Color" instead of "BackgroundColor"? Why default to white? |
||
|
|
||
| /** | ||
| * The bounding rectangle for which the contextual menu can appear in. | ||
| */ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,7 @@ export class CalloutContent extends BaseComponent<ICalloutProps, ICalloutState> | |
| preventDismissOnScroll: false, | ||
| isBeakVisible: true, | ||
| beakWidth: 16, | ||
| beakColor: "#ffffff", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dzearing: Is there any way we can make this value themeable? |
||
| gapSpace: 16, | ||
| directionalHint: DirectionalHint.bottomAutoEdge | ||
| }; | ||
|
|
@@ -96,7 +97,8 @@ export class CalloutContent extends BaseComponent<ICalloutProps, ICalloutState> | |
| isBeakVisible, | ||
| beakStyle, | ||
| children, | ||
| beakWidth } = this.props; | ||
| beakWidth, | ||
| beakColor } = this.props; | ||
| let { positions } = this.state; | ||
| let beakStyleWidth = beakWidth; | ||
|
|
||
|
|
@@ -110,7 +112,8 @@ export class CalloutContent extends BaseComponent<ICalloutProps, ICalloutState> | |
| top: positions && positions.beakPosition ? positions.beakPosition.top : BEAK_ORIGIN_POSITION.top, | ||
| left: positions && positions.beakPosition ? positions.beakPosition.left : BEAK_ORIGIN_POSITION.left, | ||
| height: beakStyleWidth, | ||
| width: beakStyleWidth | ||
| width: beakStyleWidth, | ||
| backgroundColor: beakColor, | ||
| }; | ||
|
|
||
| let directionalClassName = positions && positions.directionalClassName ? `ms-u-${positions.directionalClassName}` : ''; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, spelling