mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Deploy website
Deploy website version based on 82be2841c2cc50ef5345436f5a55c7f6fc34faeb
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Style · React Native</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>With React Native, you don't use a special language or syntax for defining styles. You just style your application using JavaScript. All of the core components accept a prop named <code>style</code>. The style names and <a href="/react-native/docs/next/colors">values</a> usually match how CSS works on the web, except names are written using camel casing, e.g <code>backgroundColor</code> rather than <code>background-color</code>.</p>
|
||||
"/><meta name="docsearch:version" content="next"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Style · React Native"/><meta property="og:type" content="website"/><meta property="og:url" content="https://facebook.github.io/react-native/"/><meta property="og:description" content="<p>With React Native, you don't use a special language or syntax for defining styles. You just style your application using JavaScript. All of the core components accept a prop named <code>style</code>. The style names and <a href="/react-native/docs/next/colors">values</a> usually match how CSS works on the web, except names are written using camel casing, e.g <code>backgroundColor</code> rather than <code>background-color</code>.</p>
|
||||
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Style · React Native</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>With React Native, you don't use a special language or syntax for defining styles. You just style your application using JavaScript. All of the core components accept a prop named <code>style</code>. The style names and <a href="/react-native/docs/next/colors">values</a> usually match how CSS works on the web, except names are written using camel casing, e.g. <code>backgroundColor</code> rather than <code>background-color</code>.</p>
|
||||
"/><meta name="docsearch:version" content="next"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Style · React Native"/><meta property="og:type" content="website"/><meta property="og:url" content="https://facebook.github.io/react-native/"/><meta property="og:description" content="<p>With React Native, you don't use a special language or syntax for defining styles. You just style your application using JavaScript. All of the core components accept a prop named <code>style</code>. The style names and <a href="/react-native/docs/next/colors">values</a> usually match how CSS works on the web, except names are written using camel casing, e.g. <code>backgroundColor</code> rather than <code>background-color</code>.</p>
|
||||
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/react-native/img/favicon.png"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/solarized-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://facebook.github.io/react-native/blog/atom.xml" title="React Native Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://facebook.github.io/react-native/blog/feed.xml" title="React Native Blog RSS Feed"/><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
@@ -70,7 +70,7 @@
|
||||
};
|
||||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://github.com/facebook/react-native-website/blob/master/docs/style.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 class="postHeaderTitle">Style</h1></header><article><div><span><p>With React Native, you don't use a special language or syntax for defining styles. You just style your application using JavaScript. All of the core components accept a prop named <code>style</code>. The style names and <a href="/react-native/docs/next/colors">values</a> usually match how CSS works on the web, except names are written using camel casing, e.g <code>backgroundColor</code> rather than <code>background-color</code>.</p>
|
||||
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://github.com/facebook/react-native-website/blob/master/docs/style.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 class="postHeaderTitle">Style</h1></header><article><div><span><p>With React Native, you don't use a special language or syntax for defining styles. You just style your application using JavaScript. All of the core components accept a prop named <code>style</code>. The style names and <a href="/react-native/docs/next/colors">values</a> usually match how CSS works on the web, except names are written using camel casing, e.g. <code>backgroundColor</code> rather than <code>background-color</code>.</p>
|
||||
<p>The <code>style</code> prop can be a plain old JavaScript object. That's the simplest and what we usually use for example code. You can also pass an array of styles - the last style in the array has precedence, so you can use this to inherit styles.</p>
|
||||
<p>As a component grows in complexity, it is often cleaner to use <code>StyleSheet.create</code> to define several styles in one place. Here's an example:</p>
|
||||
<div class="web-player"><pre><code class="hljs css javascript"><span class="hljs-keyword">import</span> React, { Component } <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Style · React Native</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>With React Native, you don't use a special language or syntax for defining styles. You just style your application using JavaScript. All of the core components accept a prop named <code>style</code>. The style names and <a href="/react-native/docs/next/colors">values</a> usually match how CSS works on the web, except names are written using camel casing, e.g <code>backgroundColor</code> rather than <code>background-color</code>.</p>
|
||||
"/><meta name="docsearch:version" content="next"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Style · React Native"/><meta property="og:type" content="website"/><meta property="og:url" content="https://facebook.github.io/react-native/"/><meta property="og:description" content="<p>With React Native, you don't use a special language or syntax for defining styles. You just style your application using JavaScript. All of the core components accept a prop named <code>style</code>. The style names and <a href="/react-native/docs/next/colors">values</a> usually match how CSS works on the web, except names are written using camel casing, e.g <code>backgroundColor</code> rather than <code>background-color</code>.</p>
|
||||
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Style · React Native</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<p>With React Native, you don't use a special language or syntax for defining styles. You just style your application using JavaScript. All of the core components accept a prop named <code>style</code>. The style names and <a href="/react-native/docs/next/colors">values</a> usually match how CSS works on the web, except names are written using camel casing, e.g. <code>backgroundColor</code> rather than <code>background-color</code>.</p>
|
||||
"/><meta name="docsearch:version" content="next"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="Style · React Native"/><meta property="og:type" content="website"/><meta property="og:url" content="https://facebook.github.io/react-native/"/><meta property="og:description" content="<p>With React Native, you don't use a special language or syntax for defining styles. You just style your application using JavaScript. All of the core components accept a prop named <code>style</code>. The style names and <a href="/react-native/docs/next/colors">values</a> usually match how CSS works on the web, except names are written using camel casing, e.g. <code>backgroundColor</code> rather than <code>background-color</code>.</p>
|
||||
"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/react-native/img/favicon.png"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/solarized-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://facebook.github.io/react-native/blog/atom.xml" title="React Native Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://facebook.github.io/react-native/blog/feed.xml" title="React Native Blog RSS Feed"/><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
@@ -70,7 +70,7 @@
|
||||
};
|
||||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://github.com/facebook/react-native-website/blob/master/docs/style.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 class="postHeaderTitle">Style</h1></header><article><div><span><p>With React Native, you don't use a special language or syntax for defining styles. You just style your application using JavaScript. All of the core components accept a prop named <code>style</code>. The style names and <a href="/react-native/docs/next/colors">values</a> usually match how CSS works on the web, except names are written using camel casing, e.g <code>backgroundColor</code> rather than <code>background-color</code>.</p>
|
||||
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://github.com/facebook/react-native-website/blob/master/docs/style.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 class="postHeaderTitle">Style</h1></header><article><div><span><p>With React Native, you don't use a special language or syntax for defining styles. You just style your application using JavaScript. All of the core components accept a prop named <code>style</code>. The style names and <a href="/react-native/docs/next/colors">values</a> usually match how CSS works on the web, except names are written using camel casing, e.g. <code>backgroundColor</code> rather than <code>background-color</code>.</p>
|
||||
<p>The <code>style</code> prop can be a plain old JavaScript object. That's the simplest and what we usually use for example code. You can also pass an array of styles - the last style in the array has precedence, so you can use this to inherit styles.</p>
|
||||
<p>As a component grows in complexity, it is often cleaner to use <code>StyleSheet.create</code> to define several styles in one place. Here's an example:</p>
|
||||
<div class="web-player"><pre><code class="hljs css javascript"><span class="hljs-keyword">import</span> React, { Component } <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>;
|
||||
|
||||
Reference in New Issue
Block a user