Skip to content

Commit d393f59

Browse files
committed
Minor css fixes for docs landing page
1 parent da53cf1 commit d393f59

File tree

7 files changed

+11
-5
lines changed

7 files changed

+11
-5
lines changed

docuilib/docusaurus.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const darkCodeTheme = themes.dracula;
2323
landingPage: {
2424
sections: ['components', 'features', 'code', 'libraries'],
2525
mainSectionTitle: 'RNUI is a UI Toolset & Components Library for React Native',
26+
mainSectionTitleWidth: 600,
2627
showStars: true,
2728
stars: '6.8',
2829
showExpoButton: true

docuilib/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "uilib-docs",
3-
"version": "3.23.0",
3+
"version": "3.24.0",
44
"main": "./src/index.ts",
55
"scripts": {
66
"docusaurus": "docusaurus",

docuilib/src/components/ComponentsSection.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default () => {
1616
Basic components like Button, Avatar and Card and more sophisticated ones like Hints, ColorPicker and Drawer.
1717
</p>
1818
<Link to={`docs/${docsMainEntry}`}>
19-
<button className={'button dark'}>View Docs</button>
19+
<button className={'button dark'}>View Documentation</button>
2020
</Link>
2121
</div>
2222
<img src={showcase} alt="showcase"/>

docuilib/src/components/MainSection.module.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
width: 100%;
66
display: flex;
77
justify-content: center;
8-
margin-bottom: 40px;
98

109
@include desktop {
1110
height: 100vh;
11+
overflow-y: hidden;
1212
}
1313

1414
.mainCover {

docuilib/src/components/MainSection.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const STARS_COUNT_KEY = 'starsCount';
1212
export default () => {
1313
const {siteConfig} = useDocusaurusContext();
1414
const {expoSnackLink, docsMainEntry, docsDevelopmentVersion} = siteConfig.customFields;
15-
const {showExpoButton, mainSectionTitle, showStars, stars} = useLandingPageOptions();
15+
const {showExpoButton, mainSectionTitle, mainSectionTitleWidth, showStars, stars} = useLandingPageOptions();
1616
const [starsCount, setStarsCount] = useState(localStorage.getItem(STARS_COUNT_KEY) ?? stars);
1717

1818
useEffect(() => {
@@ -32,7 +32,7 @@ export default () => {
3232
<div className={styles.main}>
3333
<img src={mainCover} alt="showcase" className={styles.mainCover}/>
3434
<div className={styles.mainContent}>
35-
<p>
35+
<p style={{maxWidth: mainSectionTitleWidth}}>
3636
{mainSectionTitle}
3737
{/* <span className={styles.libName}>RNUI</span> is a UI Toolset & Components Library for React Native */}
3838
</p>

docuilib/src/css/custom.css

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ html[data-theme='dark'] .docusaurus-highlight-code-line {
3333
background-color: rgba(0, 0, 0, 0.3);
3434
}
3535

36+
main {
37+
overflow-x: hidden;
38+
}
39+
3640
/* Markdown pages */
3741

3842
.container {

docuilib/src/hooks/useLandingPageOptions.ts

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
33
export interface LandingPageOptions {
44
sections: string[];
55
mainSectionTitle: string;
6+
mainSectionTitleWidth: number;
67
showStars: boolean;
78
stars: number;
89
showExpoButton: boolean;

0 commit comments

Comments
 (0)