Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

## [Unreleased]

### BREAKING CHANGES
- Type `FontFaceStyle` was renamed to `FontFaceProps` @layershifter ([#1487](https://github.com/stardust-ui/react/pull/1487))
- Type `style` was renamed to `props` on `FontFace` @layershifter ([#1487](https://github.com/stardust-ui/react/pull/1487))

### Fixes
- Fix prop types of `Tooltip` component @kuzhelov ([#1499](https://github.com/stardust-ui/react/pull/1499))
- Fix `Popup` styling with `pointer` when it is wrapped by `FocusZones` @layershifter ([#1492](https://github.com/stardust-ui/react/pull/1492))
Expand Down
3 changes: 2 additions & 1 deletion packages/react/src/components/Provider/Provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ class Provider extends React.Component<WithAsProp<ProviderProps>> {
if (!_.isPlainObject(font)) {
throw new Error(`fontFaces must be objects, got: ${typeof font}`)
}
felaRenderer.renderFont(font.name, font.paths, font.style)

felaRenderer.renderFont(font.name, font.paths, font.props)
}

fontFaces.forEach((font: FontFace) => {
Expand Down
6 changes: 3 additions & 3 deletions packages/react/src/themes/teams/fontFaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ const fontFaces: FontFaces = [
paths: [
'https://static2.sharepointonline.com/files/fabric/assets/fonts/segoeui-westeuropean/segoeui-regular.woff2',
],
style: { fontWeight: 400 },
props: { fontWeight: 400 },
},
{
name: 'Segoe UI',
paths: [
'https://static2.sharepointonline.com/files/fabric/assets/fonts/segoeui-westeuropean/segoeui-semibold.woff2',
],
style: { fontWeight: 600 },
props: { fontWeight: 600 },
},
{
name: 'Segoe UI',
paths: [
'https://static2.sharepointonline.com/files/fabric/assets/fonts/segoeui-westeuropean/segoeui-bold.woff2',
],
style: { fontWeight: 700 },
props: { fontWeight: 700 },
},
]

Expand Down
6 changes: 3 additions & 3 deletions packages/react/src/themes/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -547,19 +547,19 @@ export interface Renderer extends FelaRenderer {}
// Fonts
// ========================================================

export interface FontFaceStyle {
export interface FontFaceProps {
fontStretch?: string
fontStyle?: string
fontVariant?: string
fontWeight?: number
localAlias?: string
localAlias?: string | string[]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to Fela definitions: localAlias?: string | Array<string>

unicodeRange?: string
}

export interface FontFace {
name: string
paths: string[]
style: FontFaceStyle
props: FontFaceProps
}

export type FontFaces = FontFace[]
Expand Down