Skip to content

Commit 096b823

Browse files
committed
feat: Add new acrylic theme
1 parent fa58536 commit 096b823

File tree

29 files changed

+202
-297
lines changed

29 files changed

+202
-297
lines changed
3.36 MB
Loading

docs/src/components/DocsTreeView/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ export default class DocsTreeView extends React.Component<DocsTreeViewProps, Doc
150150
return (
151151
<div
152152
style={theme.prefixStyle({
153+
...theme.acrylicTexture40.style,
153154
width: 320,
154155
padding: "10px 0",
155-
background: theme.useFluentDesign ? theme.acrylicTexture40.background : theme.chromeLow,
156156
...style
157157
})}
158158
{...attributes}

docs/src/components/Wrapper/components/Footer.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,10 @@ function getStyles(footer: Footer): {
8989

9090
return {
9191
root: prefixStyle({
92+
...theme.acrylicTexture40.style,
9293
zIndex: theme.zIndex.header,
9394
fontSize: 14,
9495
color: theme.baseHigh,
95-
background: theme.useFluentDesign ? (
96-
theme.isDarkTheme ? "hsla(0, 0%, 0%, 0.95)" : "hsla(0, 0%, 100%, 0.95)"
97-
) : (
98-
theme.isDarkTheme ? "hsla(0, 0%, 5%, 0.85)" : "hsla(0, 0%, 95%, 0.85)"
99-
),
10096
minHeight: footerHeight,
10197
...style
10298
}),

docs/src/components/Wrapper/components/Header.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,7 @@ function getStyles(header: Header): {
218218
root: prefixStyle({
219219
fontSize: 14,
220220
color: theme.baseHigh,
221-
background: theme.useFluentDesign ? (
222-
theme.isDarkTheme ? "hsla(0, 0%, 0%, 0.95)" : "hsla(0, 0%, 100%, 0.95)"
223-
) : (
224-
theme.isDarkTheme ? "hsla(0, 0%, 5%, 0.85)" : "hsla(0, 0%, 95%, 0.85)"
225-
),
221+
...theme.acrylicTexture40.style,
226222
boxShadow: theme.isDarkTheme ? void 0 : `0 2px 8px ${theme.listLow}`,
227223
width: "100%",
228224
height: headerHeight,

docs/src/components/WrapperWithCategories/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ function getStyles(wrapperWithCategories: WrapperWithCategories) {
8585
margin: "0 auto"
8686
}),
8787
side: prefixStyle({
88-
background: theme.useFluentDesign ? theme.acrylicTexture80.background : theme.altHigh,
88+
background: theme.altMediumLow,
89+
// ...theme.acrylicTexture60.style,
8990
width: notPhoneTablet ? "calc(100% - 320px)" : "100%",
9091
...(theme.useFluentDesign ? void 0 : getStripedBackground(4, tinycolor(theme.baseHigh).setAlpha(0.025).toRgbString(), "transparent")),
9192
minHeight: "100%"

docs/src/routes/Styles/Acrylic/SimpleExample.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import * as React from "react";
22
import * as PropTypes from "prop-types";
33

4-
import AutoSuggestBox from "react-uwp/AutoSuggestBox";
5-
64
export default class SimpleExample extends React.Component {
75
static contextTypes = { theme: PropTypes.object };
86
context: { theme: ReactUWP.ThemeType };
@@ -21,6 +19,7 @@ export default class SimpleExample extends React.Component {
2119
outline: "none",
2220
border: `1px solid ${theme.listAccentLow}`
2321
};
22+
2423
return (
2524
<div
2625
style={theme.prefixStyle({
@@ -34,13 +33,13 @@ export default class SimpleExample extends React.Component {
3433
background: theme.desktopBackground
3534
})}
3635
>
37-
<span style={{ ...itemStyle, background: theme.acrylicTexture40.background }}>
36+
<span style={{ ...itemStyle, ...theme.acrylicTexture40.style }}>
3837
theme.acrylicTexture40.background
3938
</span>
40-
<span style={{ ...itemStyle, background: theme.acrylicTexture60.background }}>
39+
<span style={{ ...itemStyle, ...theme.acrylicTexture60.style }}>
4140
theme.acrylicTexture60.background
4241
</span>
43-
<span style={{ ...itemStyle, background: theme.acrylicTexture80.background }}>
42+
<span style={{ ...itemStyle, ...theme.acrylicTexture80.style }}>
4443
theme.acrylicTexture80.background
4544
</span>
4645
</div>

docs/src/routes/index.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import * as React from "react";
2-
import { Router, RouteComponent, browserHistory } from "react-router";
2+
import { Router, browserHistory } from "react-router";
33

44
import Theme from "react-uwp/Theme";
55
import getTheme from "react-uwp/styles/getTheme";
66
import Wrapper from "../components/Wrapper";
77
import WrapperWithCategories from "../components/WrapperWithCategories";
8-
import setStaticAcrylicTexture from "utils/setStaticAcrylicTexture";
98

109
export interface RouterCallback {
1110
(error: any, component?: any): void;
@@ -22,8 +21,6 @@ export class ThemeWrapper extends React.Component {
2221
return (
2322
<Theme
2423
theme={theme}
25-
needGenerateAcrylic={false}
26-
// themeWillUpdate={setStaticAcrylicTexture}
2724
>
2825
{children}
2926
</Theme>

docs/src/utils/setStaticAcrylicTexture.ts

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/CalendarView/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,12 @@ function getStyles(calendarView: CalendarView): {
315315

316316
return {
317317
root: prefixStyle({
318+
...theme.acrylicTexture80.style,
318319
display: "inline-block",
319320
verticalAlign: "middle",
320321
fontSize: 14,
321322
color: theme.baseHigh,
322323
width: 296,
323-
background: background || (theme.useFluentDesign ? theme.acrylicTexture80.background : theme.altHigh),
324324
border: `2px solid ${theme.baseLow}`,
325325
...style
326326
}),

src/ColorPicker/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,7 @@ function getStyles(colorPicker: ColorPicker): {
339339
context: { theme },
340340
props: {
341341
style,
342-
size,
343-
defaultColor
342+
size
344343
},
345344
state: { h, s, v }
346345
} = colorPicker;

0 commit comments

Comments
 (0)