-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from component-driven/feat-slide-bh
Support background image for Primary and Secondary slides
- Loading branch information
Showing
3 changed files
with
50 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
import React from 'react'; | ||
import { Invert } from 'mdx-deck'; | ||
import React from "react"; | ||
import {Invert} from "mdx-deck"; | ||
|
||
export default props => <Invert bg="primary" {...props} />; | ||
export default ({ children, imgSrc, sx, ...props }) => ( | ||
<Invert | ||
sx={{ | ||
backgroundColor: "primary", | ||
backgroundSize: "cover", | ||
backgroundImage: `url(${imgSrc})`, | ||
backgroundPosition: "center", | ||
backgroundBlendMode: "multiply", | ||
...sx, | ||
}} | ||
{...props} | ||
> | ||
{children} | ||
</Invert> | ||
); |
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,6 +1,13 @@ | ||
import React from "react"; | ||
import { Color } from "mdx-deck"; | ||
import {Invert} from "mdx-deck"; | ||
|
||
export default (props) => ( | ||
<Color bg="secondary" color="background" {...props} /> | ||
); | ||
export default ({children, imgSrc, sx,...props}) => <Invert sx={{ | ||
backgroundColor: "secondary", | ||
backgroundSize: "cover", | ||
backgroundImage: `url(${imgSrc})`, | ||
backgroundPosition: "center", | ||
backgroundBlendMode: "multiply", | ||
...sx, | ||
}} {...props}> | ||
{children} | ||
</Invert>; |