diff --git a/website/layout/AutodocsLayout.js b/website/layout/AutodocsLayout.js
index c918b7d624..9ee1d01f4d 100644
--- a/website/layout/AutodocsLayout.js
+++ b/website/layout/AutodocsLayout.js
@@ -17,6 +17,7 @@ var React = require('React');
var Site = require('Site');
var slugify = require('slugify');
+var styleReferencePattern = /^[^.]+\.propTypes\.style$/;
var ComponentDoc = React.createClass({
renderType: function(type) {
@@ -40,12 +41,20 @@ var ComponentDoc = React.createClass({
}
if (type.name === 'custom') {
+ if (styleReferencePattern.test(type.raw)) {
+ var name = type.raw.substring(0, type.raw.indexOf('.'));
+ return {name}#style
+ }
if (type.raw === 'EdgeInsetsPropType') {
return '{top: number, left: number, bottom: number, right: number}';
}
return type.raw;
}
+ if (type.name === 'stylesheet') {
+ return 'style';
+ }
+
if (type.name === 'func') {
return 'function';
}
@@ -63,6 +72,8 @@ var ComponentDoc = React.createClass({
{this.renderType(prop.type)}
}
+ {prop.type && prop.type.name === 'stylesheet' &&
+ this.renderStylesheetProps(prop.type.value)}
{prop.description &&