Skip to content

Commit

Permalink
[update] Angular and React integration guides (styles)
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiipylypchuk1991 committed Aug 26, 2024
1 parent 3e11444 commit 19b9eee
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
2 changes: 0 additions & 2 deletions docs/guides/integration_with_angular.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ body {

/* specify styles for the Event Calendar container */
.widget {
position: relative;
width: 100%;
height: 100%;
}
~~~
Expand Down
26 changes: 23 additions & 3 deletions docs/guides/integration_with_react.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,27 @@ export default function EventCalendarComponent(props) {
};
}, []);

return <div ref={container} style={{ width: "100%", height: "100%" }}></div>;
return <div ref={container} className="widget"></div>;
}
~~~

#### Adding styles

To display Event Calendar correctly, you need to provide the corresponding styles. You can use the **index.css** file to specify important styles for Event Calendar and its container:

~~~css title="index.css"
/* specify styles for initial page */
html,
body,
#root {
height: 100%;
padding: 0;
margin: 0;
}

/* specify styles for the Event Calendar container */
.widget {
height: 100%;
}
~~~

Expand Down Expand Up @@ -180,7 +200,7 @@ export default function EventCalendarComponent(props) {
}
}, []);

return <div ref={container} style={{ width: "100%", height: "100%" }}></div>;
return <div ref={container} className="widget"></div>;
}
~~~

Expand All @@ -207,7 +227,7 @@ export default function EventCalendarComponent(props) {
}
}, []);

return <div ref={container} style={{ width: "100%", height: "100%" }}></div>;
return <div ref={container} className="widget"></div>;
}
~~~

Expand Down

0 comments on commit 19b9eee

Please sign in to comment.