Skip to content

Commit 018b832

Browse files
[update] Integration guides (#31)
* [update] redirects * [dev] update docusaurus from 3.3.2 to 3.5.2 * [update] test commit * [update] Angular integration guide * [update] React integration guide * [update] React and Angular guides (styles) * [update] React and Vue integration guides
1 parent 5080893 commit 018b832

File tree

2 files changed

+32
-49
lines changed

2 files changed

+32
-49
lines changed

docs/guides/integration_with_react.md

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export default function KanbanComponent(props) {
122122

123123
#### Adding styles
124124

125-
To display Kanban correctly, you need to provide the corresponding styles. You can use the **index.css** file to specify important styles for Kanban and containers:
125+
To display Kanban correctly, you need to specify important styles for Kanban and its container in the main css file of the project:
126126

127127
~~~css title="index.css"
128128
/* specify styles for initial page */
@@ -324,22 +324,6 @@ useEffect(() => {
324324
// ...
325325
~~~
326326

327-
### Step 3. Adding Kanban into the app
328-
329-
To add the component into the app, open the ***App.js*** file and replace the default code with the following one:
330-
331-
~~~jsx title="App.js"
332-
import Kanban from "./Kanban";
333-
import { getData } from "./data";
334-
335-
function App() {
336-
const { columns, cards } = getData();
337-
return <Kanban columns={columns} cards={cards} rows={rows} />;
338-
}
339-
340-
export default App;
341-
~~~
342-
343327
After that, you can start the app to see Kanban loaded with data on a page.
344328

345329
![Kanban initialization](../assets/trial_kanban.png)

docs/guides/integration_with_vue.md

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ Install dependencies and start the dev server. For this, use a package manager:
4040

4141
- if you use [**yarn**](https://yarnpkg.com/), run the following commands:
4242

43-
~~~json
43+
~~~jsx
4444
yarn
45-
yarn start
45+
yarn start // or yarn dev
4646
~~~
4747

4848
- if you use [**npm**](https://www.npmjs.com/), run the following commands:
@@ -123,11 +123,37 @@ export default {
123123
<template>
124124
<div class="component_container">
125125
<div ref="toolbar_container"></div>
126-
<div ref="kanban_container" style="height: calc(100% - 56px);"></div>
126+
<div ref="kanban_container" class="widget"></div>
127127
</div>
128128
</template>
129129
~~~
130130

131+
#### Adding styles
132+
133+
To display Kanban correctly, you need to specify important styles for Kanban and its container in the main css file of the project:
134+
135+
~~~css title="main.css"
136+
/* specify styles for initial page */
137+
html,
138+
body,
139+
#app { /* make sure that you use the #app root container */
140+
height: 100%;
141+
padding: 0;
142+
margin: 0;
143+
}
144+
145+
/* specify styles for Kanban and Toolbar container */
146+
.component_container {
147+
height: 100%;
148+
margin: 0 auto;
149+
}
150+
151+
/* specify styles for Kanban container */
152+
.widget {
153+
height: calc(100% - 56px);
154+
}
155+
~~~
156+
131157
#### Loading data
132158

133159
To add data into the Kanban, you need to provide a data set. You can create the ***data.js*** file in the ***src/*** directory and add some data into it:
@@ -244,7 +270,7 @@ export default {
244270
<template>
245271
<div class="component_container">
246272
<div ref="toolbar_container"></div>
247-
<div ref="kanban_container" style="height: calc(100% - 56px);"></div>
273+
<div ref="kanban_container" class="widget"></div>
248274
</div>
249275
</template>
250276
~~~
@@ -290,7 +316,7 @@ export default {
290316
<template>
291317
<div class="component_container">
292318
<div ref="toolbar_container"></div>
293-
<div ref="kanban_container" style="height: calc(100% - 56px);"></div>
319+
<div ref="kanban_container" class="widget"></div>
294320
</div>
295321
</template>
296322
~~~
@@ -327,33 +353,6 @@ export default {
327353
// ...
328354
~~~
329355

330-
### Step 3. Adding Kanban into the app
331-
332-
To add the component into the app, open the **App.vue** file and replace the default code with the following one:
333-
334-
~~~html title="App.vue"
335-
<script>
336-
import Kanban from "./components/Kanban.vue";
337-
import { getData } from "./data";
338-
339-
export default {
340-
components: { Kanban },
341-
data() {
342-
const { columns, cards, rows } = getData();
343-
return {
344-
columns,
345-
cards,
346-
rows
347-
};
348-
}
349-
};
350-
</script>
351-
352-
<template>
353-
<Kanban :columns="columns" :cards="cards" :rows="rows" />
354-
</template>
355-
~~~
356-
357356
After that, you can start the app to see Kanban loaded with data on a page.
358357

359358
![Kanban initialization](../assets/trial_kanban.png)

0 commit comments

Comments
 (0)