Skip to content

Commit a0f37f0

Browse files
authored
Fullscreen Button Takes Applied Color (#574)
1 parent 97c6379 commit a0f37f0

File tree

4 files changed

+16
-18
lines changed

4 files changed

+16
-18
lines changed

src/components/__snapshots__/fullscreen.test.js.snap

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,26 @@ exports[`<Fullscreen /> should render correctly. 1`] = `
44
<Fullscreen>
55
<Styled(FullscreenButton)
66
onClick={[Function]}
7-
style={undefined}
7+
styles={undefined}
88
viewBox="0 0 512 512"
99
>
1010
<FullscreenButton
1111
className="css-12n5ud e4v3eea0"
1212
onClick={[Function]}
13-
style={undefined}
13+
styles={undefined}
1414
viewBox="0 0 512 512"
1515
>
1616
<Styled(button)
1717
aria-label="Toggle full screen"
1818
className="css-12n5ud e4v3eea0"
1919
onClick={[Function]}
20-
style={undefined}
20+
styles={undefined}
2121
viewBox="0 0 512 512"
2222
>
2323
<button
2424
aria-label="Toggle full screen"
2525
className="e4v3eea0 css-1hv29sw ev51h780"
2626
onClick={[Function]}
27-
style={undefined}
2827
viewBox="0 0 512 512"
2928
>
3029
<svg

src/components/__snapshots__/manager.test.js.snap

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -335,27 +335,26 @@ exports[`<Manager /> should render correctly. 1`] = `
335335
<Fullscreen>
336336
<Styled(FullscreenButton)
337337
onClick={[Function]}
338-
style={undefined}
338+
styles={undefined}
339339
viewBox="0 0 512 512"
340340
>
341341
<FullscreenButton
342342
className="css-12n5ud e4v3eea0"
343343
onClick={[Function]}
344-
style={undefined}
344+
styles={undefined}
345345
viewBox="0 0 512 512"
346346
>
347347
<Styled(button)
348348
aria-label="Toggle full screen"
349349
className="css-12n5ud e4v3eea0"
350350
onClick={[Function]}
351-
style={undefined}
351+
styles={undefined}
352352
viewBox="0 0 512 512"
353353
>
354354
<button
355355
aria-label="Toggle full screen"
356356
className="e4v3eea0 css-1hv29sw ev51h780"
357357
onClick={[Function]}
358-
style={undefined}
359358
viewBox="0 0 512 512"
360359
>
361360
<svg
@@ -669,27 +668,26 @@ exports[`<Manager /> should render the overview configuration when specified. 1`
669668
<Fullscreen>
670669
<Styled(FullscreenButton)
671670
onClick={[Function]}
672-
style={undefined}
671+
styles={undefined}
673672
viewBox="0 0 512 512"
674673
>
675674
<FullscreenButton
676675
className="css-12n5ud e4v3eea0"
677676
onClick={[Function]}
678-
style={undefined}
677+
styles={undefined}
679678
viewBox="0 0 512 512"
680679
>
681680
<Styled(button)
682681
aria-label="Toggle full screen"
683682
className="css-12n5ud e4v3eea0"
684683
onClick={[Function]}
685-
style={undefined}
684+
styles={undefined}
686685
viewBox="0 0 512 512"
687686
>
688687
<button
689688
aria-label="Toggle full screen"
690689
className="e4v3eea0 css-1hv29sw ev51h780"
691690
onClick={[Function]}
692-
style={undefined}
693691
viewBox="0 0 512 512"
694692
>
695693
<svg
@@ -1093,27 +1091,26 @@ exports[`<Manager /> should render with slideset slides 1`] = `
10931091
<Fullscreen>
10941092
<Styled(FullscreenButton)
10951093
onClick={[Function]}
1096-
style={undefined}
1094+
styles={undefined}
10971095
viewBox="0 0 512 512"
10981096
>
10991097
<FullscreenButton
11001098
className="css-12n5ud e4v3eea0"
11011099
onClick={[Function]}
1102-
style={undefined}
1100+
styles={undefined}
11031101
viewBox="0 0 512 512"
11041102
>
11051103
<Styled(button)
11061104
aria-label="Toggle full screen"
11071105
className="css-12n5ud e4v3eea0"
11081106
onClick={[Function]}
1109-
style={undefined}
1107+
styles={undefined}
11101108
viewBox="0 0 512 512"
11111109
>
11121110
<button
11131111
aria-label="Toggle full screen"
11141112
className="e4v3eea0 css-1hv29sw ev51h780"
11151113
onClick={[Function]}
1116-
style={undefined}
11171114
viewBox="0 0 512 512"
11181115
>
11191116
<svg

src/components/fullscreen-button.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ const FullscreenButton = props => (
2323
<path d="M0 0h24v24H0z" fill="none" />
2424
<path
2525
d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"
26-
fill="currentColor"
26+
fill={
27+
props.styles && props.styles.fill ? props.styles.fill : 'currentColor'
28+
}
2729
/>
2830
</svg>
2931
</Button>

src/components/fullscreen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class Fullscreen extends Component {
3737
return (
3838
<StyledFullscreen
3939
onClick={() => this.toggleFullscreen()}
40-
style={this.context.styles.fullscreen}
40+
styles={this.context.styles.fullscreen}
4141
viewBox="0 0 512 512"
4242
/>
4343
);

0 commit comments

Comments
 (0)