Skip to content

Commit 6d5f624

Browse files
author
Ives van Hoorne
committed
Allow more styling
1 parent 06b09ad commit 6d5f624

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

packages/react-sandpack/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-smooshpack",
3-
"version": "0.0.9",
3+
"version": "0.0.10",
44
"description": "",
55
"keywords": [],
66
"license": "SEE LICENSE.MD IN ROOT",
@@ -77,7 +77,7 @@
7777
"react-broadcast": "^0.6.2",
7878
"react-codemirror2": "^4.0.1",
7979
"rollup-plugin-scss": "^0.4.0",
80-
"smooshpack": "^0.0.9"
80+
"smooshpack": "^0.0.10"
8181
},
8282
"peerDependencies": {
8383
"react": "^16.0.0"

packages/react-sandpack/src/components/SandpackProvider/SandpackProvider.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ export interface State {
1414
}
1515

1616
export interface Props {
17+
className?: string;
18+
style?: Object;
1719
files: IFiles;
1820
initialPath?: string;
1921
entry?: string;
@@ -169,7 +171,7 @@ export default class SandpackProvider extends React.PureComponent<
169171
};
170172

171173
render() {
172-
const { children } = this.props;
174+
const { children, className, style } = this.props;
173175
const { iframe, files, browserPath, openedPath, managerState } = this.state;
174176

175177
return (
@@ -185,7 +187,7 @@ export default class SandpackProvider extends React.PureComponent<
185187
bundlerURL: this.manager ? this.manager.bundlerURL : undefined,
186188
}}
187189
>
188-
<div className="sandpack">
190+
<div style={style} className={`${className ? className : ''} sandpack`}>
189191
{/* We create a hidden iframe, the bundler will live in this.
190192
We expose this iframe to the Consumer, so other components can show the full
191193
iframe for preview. An implementation can be found in `Preview` component. */}

packages/sandpack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "smooshpack",
3-
"version": "0.0.9",
3+
"version": "0.0.10",
44
"description": "",
55
"keywords": [],
66
"main": "dist/sandpack.umd.js",

0 commit comments

Comments
 (0)