Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(CodeSandbox): fix broken icon fonts #3487

Merged
merged 1 commit into from
Mar 10, 2019
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ import { updateForKeys } from 'docs/src/hoc'
const appTemplate = `import React from "react";
import ReactDOM from "react-dom";
import { Container, Header, List } from "semantic-ui-react";
import "semantic-ui-css/semantic.min.css";

import Example from "./example";
import pkg from "./package.json";

const App = ({ children }) => (
<Container style={{ margin: 20 }}>
Expand All @@ -37,17 +35,20 @@ const App = ({ children }) => (
</Container>
);

// TODO: Switch to https://github.com/palmerhq/the-platform#stylesheet when it will be stable
const styleLink = document.createElement("link");
styleLink.rel = "stylesheet";
styleLink.href = "https://cdn.jsdelivr.net/npm/semantic-ui/dist/semantic.min.css";
document.head.appendChild(styleLink);

ReactDOM.render(
<App>
<Example />
</App>,
document.getElementById("root")
);
`
const dependencies = {
..._.mapValues(externals, () => 'latest'),
'semantic-ui-css': 'latest',
}
const dependencies = _.mapValues(externals, () => 'latest')

class ComponentControlsShowCode extends React.Component {
static propTypes = {
Expand Down Expand Up @@ -95,8 +96,6 @@ class ComponentControlsShowCode extends React.Component {
examplePath='/'
example={exampleCode}
dependencies={dependencies}
/* Magic trick to reload sources on passed code update */
key={exampleCode}
Copy link
Member Author

Choose a reason for hiding this comment

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

We don't need this more, was fixed in react-codesandboxer@3.1.2

name='semantic-ui-react-example'
providedFiles={{
'index.js': { content: appTemplate },
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
"raw-loader": "^1.0.0",
"react": "^16.6.0",
"react-ace": "^6.2.0",
"react-codesandboxer": "^3.1.1",
"react-codesandboxer": "^3.1.3",
"react-docgen": "^3.0.0-rc.1",
"react-dom": "^16.6.0",
"react-hot-loader": "^4.3.11",
Expand Down
25 changes: 16 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3359,10 +3359,10 @@ code-point-at@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"

codesandboxer@^0.7.1:
version "0.7.2"
resolved "https://registry.yarnpkg.com/codesandboxer/-/codesandboxer-0.7.2.tgz#f14d8cab9971cf6c535d83b0f40c24c62256d511"
integrity sha512-Fl4UAWi2F0qtFUzY2V+HX/nXm8yGHBW7UZNyBbixOqvwm6zvkx0YLJTFBUp9C5aAjvQP+5Bw6Ie9sN6UK8rebw==
codesandboxer@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/codesandboxer/-/codesandboxer-1.0.1.tgz#b294a55de488da2eae5cfc6fdd663f07fbe6bb3c"
integrity sha512-5V/MGuAPyrdlkrjRZsyBGeBeyyW0a4a+EgmlmyWttgN+AiOB/i0LLNhzVx0DlwYu/fZ38e+hdiLCe0DJQNa6oA==
dependencies:
babel-runtime "^6.26.0"
form-data "^2.3.2"
Expand Down Expand Up @@ -7803,6 +7803,11 @@ lodash.memoize@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"

lodash.pick@^4.4.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3"
integrity sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=

lodash.restparam@^3.0.0:
version "3.6.1"
resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
Expand Down Expand Up @@ -9976,12 +9981,14 @@ react-ace@^6.2.0:
lodash.isequal "^4.5.0"
prop-types "^15.6.2"

react-codesandboxer@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/react-codesandboxer/-/react-codesandboxer-3.1.1.tgz#e7af0f00509d0292f91d3730f71565dbf781b0d7"
integrity sha512-P1DybPTyHC3PRP2QZ5SeM5MaaQDkr4eROL1XYW0Y703PSPNhUeR1t6xmb5bkkvXpmPg6DdS2eqEddcfaFBimYA==
react-codesandboxer@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/react-codesandboxer/-/react-codesandboxer-3.1.3.tgz#0492685f965eb6466f841af52d46b6776c72d22e"
integrity sha512-1Qzw+UbnwkRdCCPLGdgmuCLhGzzBRPsJWDEBPlbDZQxvWXysapgPImOqva3Dp6jt3nSniZFKw4VaNdUzDnjXRA==
dependencies:
codesandboxer "^0.7.1"
codesandboxer "^1.0.1"
lodash.isequal "^4.5.0"
lodash.pick "^4.4.0"
react-node-resolver "^1.0.1"

react-dev-utils@^4.0.1:
Expand Down