This repository has been archived by the owner on Mar 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(attachment): themeing and redline (#1033)
* updates to Attachment Styles * more refinement to attachment * making action icon color match text color * updating Changelog entry for PR * fix file capitalization issue * fix accident put changelog entry in wrong place * updating attachment styles * updating icon in the attachment examples and making it show filled state on hover * updating color for attachment dark theme border and backgroundColor * updating changelog
- Loading branch information
1 parent
9d746c7
commit 16b9fd0
Showing
13 changed files
with
160 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
packages/react/src/themes/teams-dark/components/Attachment/attachmentVariables.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { AttachmentVariables } from '../../../teams/components/Attachment/attachmentVariables' | ||
|
||
export default (siteVariables: any): Partial<AttachmentVariables> => ({ | ||
textColor: siteVariables.colors.grey[50], | ||
textColorHover: siteVariables.colors.grey[50], | ||
|
||
backgroundColor: siteVariables.gray600, | ||
borderColor: siteVariables.gray850, | ||
boxShadow: siteVariables.shadowLevel1, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/react/src/themes/teams-high-contrast/componentStyles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { default as Attachment } from './components/Attachment/attachmentStyles' | ||
export { default as MenuItem } from './components/Menu/menuItemStyles' |
1 change: 1 addition & 0 deletions
1
packages/react/src/themes/teams-high-contrast/componentVariables.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
packages/react/src/themes/teams-high-contrast/components/Attachment/attachmentStyles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { ComponentSlotStylesInput, ICSSInJSStyle } from '../../../types' | ||
import { AttachmentProps } from '../../../../components/Attachment/Attachment' | ||
import { AttachmentVariables } from '../../../teams/components/Attachment/attachmentVariables' | ||
import Button from '../../../../components/Button/Button' | ||
import Icon from '../../../../components/Icon/Icon' | ||
|
||
const attachmentStyles: ComponentSlotStylesInput<AttachmentProps, AttachmentVariables> = { | ||
root: ({ props: p, variables: v }): ICSSInJSStyle => ({ | ||
...((p.actionable || p.onClick) && { | ||
...(p.isFromKeyboard && { | ||
':focus': { | ||
backgroundColor: v.backgroundColorHover, | ||
color: v.textColorHover, | ||
|
||
[`& .${Button.className}`]: { | ||
color: v.textColorHover, | ||
}, | ||
|
||
[`& .${Icon.className}`]: { | ||
color: v.textColorHover, | ||
}, | ||
}, | ||
}), | ||
|
||
':hover': { | ||
[`& .${Button.className}`]: { | ||
color: v.textColorHover, | ||
}, | ||
|
||
[`& .${Icon.className}`]: { | ||
color: v.textColorHover, | ||
}, | ||
}, | ||
}), | ||
}), | ||
|
||
action: ({ variables: v }): ICSSInJSStyle => ({ | ||
':hover': { | ||
outline: `1px solid ${v.textColorHover}`, | ||
}, | ||
}), | ||
} | ||
|
||
export default attachmentStyles |
12 changes: 12 additions & 0 deletions
12
packages/react/src/themes/teams-high-contrast/components/Attachment/attachmentVariables.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { AttachmentVariables } from '../../../teams/components/Attachment/attachmentVariables' | ||
|
||
export default (siteVariables: any): Partial<AttachmentVariables> => ({ | ||
borderColor: siteVariables.colors.white, | ||
backgroundColor: siteVariables.colors.black, | ||
backgroundColorHover: siteVariables.accessibleYellow, | ||
textColor: siteVariables.colors.white, | ||
textColorHover: siteVariables.colors.black, | ||
boxShadow: undefined, | ||
progressColor: siteVariables.accessibleGreen, | ||
progressHeight: 6, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters