Skip to content

Commit dca74af

Browse files
authored
StandWithUkraine (#1904)
* Add StandWithUkraine banner to readme * Add StandWithUkraine banner on website
1 parent a21612d commit dca74af

File tree

6 files changed

+88
-23
lines changed

6 files changed

+88
-23
lines changed

README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner-direct.svg)](https://stand-with-ukraine.pp.ua)
2+
13
<p align="center">
24
<img src="https://user-images.githubusercontent.com/1780255/105469025-56759000-5ca0-11eb-993d-3568c1fd54f4.png" height="250px" style="display:block"/>
35
</p>
@@ -6,13 +8,12 @@
68
<img src="https://user-images.githubusercontent.com/1780255/105469340-bec47180-5ca0-11eb-8986-3eb986f884d9.jpg"/>
79
</p>
810

9-
1011
---
12+
1113
[![Build Status](https://travis-ci.org/wix/react-native-ui-lib.svg?branch=master)](https://travis-ci.org/wix/react-native-ui-lib)
1214
[![npm](https://img.shields.io/npm/v/react-native-ui-lib.svg)](https://www.npmjs.com/package/react-native-ui-lib)
1315
[![NPM Downloads](https://img.shields.io/npm/dm/react-native-ui-lib.svg?style=flat)](https://www.npmjs.com/package/react-native-ui-lib)
14-
<a href="https://twitter.com/rnuilib"><img src="https://img.shields.io/twitter/follow/rnuilib.svg?style=flat&colorA=1DA1F2&colorB=20303C&label=Follow%20us%20on%20Twitter" alt="Follow on Twitter"></a>
15-
16+
<a href="https://twitter.com/rnuilib"><img src="https://img.shields.io/twitter/follow/rnuilib.svg?style=flat&colorA=1DA1F2&colorB=20303C&label=Follow%20us%20on%20Twitter" alt="Follow on Twitter"></a>
1617

1718
Check out our [Docs](https://wix.github.io/react-native-ui-lib/). <br>
1819
Our [Discord Channel](https://discord.gg/2eW4g6Z)
@@ -21,23 +22,26 @@ Download our Expo demo app <br>
2122
<img height="120" src="https://user-images.githubusercontent.com/1780255/76164023-f2171400-6153-11ea-962d-d57b64a08a80.png"> <br>
2223
(You will need the Expo App)
2324

24-
2525
## Installing
2626

2727
See setup instructions [here](https://wix.github.io/react-native-ui-lib/docs/getting-started/setup).
2828

2929
#### New Major Version 6.0
30+
3031
See [breaking changes](https://wix.github.io/react-native-ui-lib/docs/getting-started/v6)
3132

3233
#### For React Native >= 0.60.0
34+
3335
please use `react-native-ui-lib`
3436

3537
#### For React Native < 0.60.0
38+
3639
please use `react-native-ui-lib@^3.0.0`
3740

3841
## Create your own Design System in 3 easy steps
3942

4043
### Step 1
44+
4145
Load your foundations and presets (colors, typography, spacings, etc...)
4246

4347
```js
@@ -57,18 +61,18 @@ Colors.loadColors({
5761
Typography.loadTypographies({
5862
heading: {fontSize: 36, fontWeight: '600'},
5963
subheading: {fontSize: 28, fontWeight: '500'},
60-
body: {fontSize: 18, fontWeight: '400'},
64+
body: {fontSize: 18, fontWeight: '400'}
6165
});
6266

6367
Spacings.loadSpacings({
6468
page: 20,
6569
card: 12,
6670
gridGutter: 16
6771
});
68-
6972
```
7073

7174
### Step 2
75+
7276
Set default configurations to your components
7377

7478
```js
@@ -94,8 +98,9 @@ ThemeManager.setComponentTheme('Button', (props, context) => {
9498
```
9599

96100
### Step 3
97-
Use it all together.
98-
Your configurations will be applied on uilib components so you can use them easily with [modifiers](https://wix.github.io/react-native-ui-lib/docs/foundation/modifiers).
101+
102+
Use it all together.
103+
Your configurations will be applied on uilib components so you can use them easily with [modifiers](https://wix.github.io/react-native-ui-lib/docs/foundation/modifiers).
99104

100105
```jsx
101106
// MyScreen.js
@@ -107,15 +112,16 @@ class MyScreen extends Component {
107112
render() {
108113
return (
109114
<View flex padding-page>
110-
<Text heading marginB-s4>My Screen</Text>
115+
<Text heading marginB-s4>
116+
My Screen
117+
</Text>
111118
<Card height={100} center padding-card marginB-s4>
112119
<Text body>This is an example card </Text>
113120
</Card>
114-
121+
115122
<Button label="Button" body bg-primaryColor square></Button>
116123
</View>
117124
);
118125
}
119126
}
120127
```
121-

docuilib/docusaurus.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula');
2929
sidebarPath: require.resolve('./sidebars.js'),
3030
path: '../docs',
3131
// Please change this to your repo.
32-
editUrl: 'https://github.com/facebook/docusaurus/edit/main/website/'
32+
editUrl: 'https://github.com/facebook/docusaurus/edit/main/website/',
33+
docLayoutComponent: '@site/src/components/CustomLayout'
3334
},
3435
blog: {
3536
showReadingTime: true,
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import React from 'react';
2+
import DocPage from '@theme/DocPage';
3+
import StandWithUkraine from '@site/src/components/StandWithUkraine';
4+
5+
export default function CustomLayout(props) {
6+
return (
7+
<>
8+
<StandWithUkraine />
9+
<DocPage {...props} />
10+
</>
11+
);
12+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.banner {
2+
display: flex;
3+
justify-content: center;
4+
align-items: center;
5+
background-color: #1f243c;
6+
padding: 0.5em;
7+
}
8+
9+
.link {
10+
color: #fff;
11+
font-weight: bolder;
12+
text-align: center;
13+
}
14+
15+
.link:hover {
16+
color: #fff;
17+
text-decoration: none;
18+
}
19+
20+
.hashtag {
21+
color: #ffd600;
22+
}
23+
24+
@media (min-width: 768px) {
25+
.banner {
26+
height: 56px;
27+
}
28+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import React from 'react';
2+
import styles from './StandWithUkraine.module.scss';
3+
import Link from '@docusaurus/Link';
4+
5+
export default function StandWithUkraine(props) {
6+
return (
7+
<div className={styles.banner}>
8+
<Link to="https://stand-with-ukraine.pp.ua" className={styles.link}>
9+
🇺🇦 This project is created with substantial contributions from our Ukrainian colleagues.{' '}
10+
<span className={styles.hashtag}>#StandWithUkraine</span>
11+
</Link>
12+
</div>
13+
);
14+
}

docuilib/src/pages/index.tsx

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Layout from '@theme/Layout';
44
// import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
55
// import HomepageFeatures from '../components/HomepageFeatures';
66

7+
import StandWithUkraine from '../components/StandWithUkraine';
78
import MainSection from '../components/MainSection';
89
import ComponentsSection from '../components/ComponentsSection';
910
import FeaturesSection from '../components/FeaturesSection';
@@ -13,16 +14,19 @@ import LibrariesSection from '../components/LibrariesSection';
1314
export default function Home(): JSX.Element {
1415
// const {siteConfig} = useDocusaurusContext();
1516
return (
16-
<Layout
17-
/* title={`Hello from ${siteConfig.title}`} */ description="Description will go into a meta tag in <head />"
18-
>
19-
<main>
20-
<MainSection/>
21-
<ComponentsSection/>
22-
<FeaturesSection/>
23-
<CodeSection/>
24-
<LibrariesSection/>
25-
</main>
26-
</Layout>
17+
<>
18+
<StandWithUkraine />
19+
<Layout
20+
/* title={`Hello from ${siteConfig.title}`} */ description="Description will go into a meta tag in <head />"
21+
>
22+
<main>
23+
<MainSection />
24+
<ComponentsSection />
25+
<FeaturesSection />
26+
<CodeSection />
27+
<LibrariesSection />
28+
</main>
29+
</Layout>
30+
</>
2731
);
2832
}

0 commit comments

Comments
 (0)