Skip to content

Commit

Permalink
chore: refactor to a css
Browse files Browse the repository at this point in the history
  • Loading branch information
grabbou committed Jul 8, 2020
1 parent 71893cf commit 1d30636
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
14 changes: 7 additions & 7 deletions website/blog/2020-07-06-version-0.63.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ For more information on LogBox and debugging react native, see the docs [here](h

## Pressable

React Native is built to enable applications to meet user’s expectations of the platform. This includes avoiding “tells”—little things that give away that the experience was built with React Native. One major source of these tells has been the Touchable components: `Button`, `TouchableWithoutFeedback`, `TouchableHighlight`, `TouchableOpacity`, `TouchableNativeFeedback`, and `TouchableBounce`.
React Native is built to enable applications to meet user’s expectations of the platform. This includes avoiding “tells”—little things that give away that the experience was built with React Native. One major source of these tells has been the Touchable components: `Button`, `TouchableWithoutFeedback`, `TouchableHighlight`, `TouchableOpacity`, `TouchableNativeFeedback`, and `TouchableBounce`.

These components make your application interactive by allowing you to provide visual feedback to user interactions. However, because they include built-in styles and effects that don’t match the platform interaction, users can tell when experiences are written with React Native.

Expand All @@ -67,7 +67,7 @@ import { Pressable, Text } from 'react-native';
</Pressable>;
```

<p style="text-align: center; font-size: 12px">
<p class="snippet-caption">
A simple example of a Pressable component in action
</p>

Expand All @@ -86,12 +86,12 @@ For example, on iOS, the [system provides a color called `labelColor`](https://d
```jsx
import { Text, PlatformColor } from 'react-native';

<Text style={{color: PlatformColor('labelColor') }}>
<Text style={{ color: PlatformColor('labelColor') }}>
This is a label
</Text>
</Text>;
```

<p style="text-align: center; font-size: 12px">
<p class="snippet-caption">
Sets the color of the Text component to labelColor as defined by iOS.
</p>

Expand All @@ -108,7 +108,7 @@ import { View, Text, PlatformColor } from 'react-native';
</View>;
```

<p style="text-align: center; font-size: 12px">
<p class="snippet-caption">
Sets the background color of the View component to colorButtonNormal as defined by Android.
</p>

Expand All @@ -129,7 +129,7 @@ const customDynamicTextColor = DynamicColorIOS({
</Text>;
```

<p style="text-align: center; font-size: 12px">
<p class="snippet-caption">
Changes the text color based on the system theme
</p>

Expand Down
5 changes: 5 additions & 0 deletions website/static/css/blog.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
transition: none;
}

.blogContainer .snippet-caption {
text-align: center;
font-size: 12px;
}

/* Put the image on the left of the block */
.blogContainer .postHeader .authorBlock {
flex-direction: row-reverse;
Expand Down

0 comments on commit 1d30636

Please sign in to comment.