Skip to content

Commit 3e920cc

Browse files
committed
feat: Remove IntentWrapper component
BREAKING CHANGE: IntentWrapper has been removed with no replacement
1 parent 31eaa12 commit 3e920cc

File tree

4 files changed

+1
-129
lines changed

4 files changed

+1
-129
lines changed

docs/components/IntentExample.jsx

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

docs/utils.js

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,6 @@
1-
import React from 'react'
2-
import ReactDOM from 'react-dom'
3-
import IntentExample from './components/IntentExample'
4-
import translations from './fixtures/en.json'
51
import get from 'lodash/get'
62

7-
/** Fake cozy.client.intents.create to demonstrate features in Styleguide */
8-
export const fakeIntentCreate = (action, doctype, options) => {
9-
let res
10-
const p = new Promise(resolve => {
11-
res = resolve
12-
})
13-
p.start = (node, onFrameLoaded) => {
14-
const iframe = document.createElement('iframe')
15-
iframe.onload = () => {
16-
onFrameLoaded()
17-
18-
const onComplete = () => {
19-
node.removeChild(iframe)
20-
res({ result: 'OK' })
21-
}
22-
23-
// Copy all styles to the iframe
24-
Array.from(document.querySelectorAll('style')).forEach(node => {
25-
const copy = node.cloneNode(true)
26-
iframe.contentDocument.head.appendChild(copy)
27-
})
28-
29-
ReactDOM.render(
30-
React.createElement(IntentExample, {
31-
onComplete,
32-
action,
33-
doctype,
34-
options
35-
}),
36-
iframe.contentDocument.body
37-
)
38-
}
39-
node.appendChild(iframe)
40-
return p
41-
}
42-
return p
43-
}
3+
import translations from './fixtures/en.json'
444

455
export const t = path => {
466
return get(translations, path)

react/IntentWrapper/index.jsx

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

react/IntentWrapper/styles.styl

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

0 commit comments

Comments
 (0)