From f06fef4c9de0f58f166a4bd362772b2cdc92a4a0 Mon Sep 17 00:00:00 2001 From: Dennis Thompson Date: Mon, 21 Jan 2019 23:11:31 -0800 Subject: [PATCH] 0.0.10 * Adding prettySelector for customizeing the pretty variable via SCSS * Updating docs * Adding default value to props table * Adjusting table CSS --- docs/src/components/ListProps.js | 9 +++++++-- docs/src/data/props.json | 33 ++++++++++++++++++++++++++++++++ docs/src/index.js | 2 +- docs/src/styles/app.scss | 3 +++ src/components/Input.js | 10 +++++++++- 5 files changed, 53 insertions(+), 4 deletions(-) diff --git a/docs/src/components/ListProps.js b/docs/src/components/ListProps.js index a84744c..35a4847 100644 --- a/docs/src/components/ListProps.js +++ b/docs/src/components/ListProps.js @@ -31,6 +31,7 @@ type Prop = { properties: Array } }, + defaultValue: string, description: string }; @@ -101,12 +102,13 @@ export default function ListProps() { return ( - +
+ @@ -117,9 +119,12 @@ export default function ListProps() { + ); diff --git a/docs/src/data/props.json b/docs/src/data/props.json index b3990f2..ac847f7 100644 --- a/docs/src/data/props.json +++ b/docs/src/data/props.json @@ -137,6 +137,17 @@ }, "description": "Additional class selectors to pass to the `pretty` element." }, + "prettySelector": { + "required": false, + "flowType": { + "name": "string" + }, + "defaultValue": { + "computed": false, + "value": "pretty" + }, + "description": "Set this to your custom value for `$pretty--class-name`. If you have not changed this in `.scss` then _do not modify this prop_." + }, "value": { "required": false, "flowType": { @@ -405,6 +416,17 @@ }, "description": "Additional class selectors to pass to the `pretty` element." }, + "prettySelector": { + "required": false, + "flowType": { + "name": "string" + }, + "defaultValue": { + "computed": false, + "value": "pretty" + }, + "description": "Set this to your custom value for `$pretty--class-name`. If you have not changed this in `.scss` then _do not modify this prop_." + }, "value": { "required": false, "flowType": { @@ -698,6 +720,17 @@ }, "description": "Additional class selectors to pass to the `pretty` element." }, + "prettySelector": { + "required": false, + "flowType": { + "name": "string" + }, + "defaultValue": { + "computed": false, + "value": "pretty" + }, + "description": "Set this to your custom value for `$pretty--class-name`. If you have not changed this in `.scss` then _do not modify this prop_." + }, "value": { "required": false, "flowType": { diff --git a/docs/src/index.js b/docs/src/index.js index 3019e96..f17d43d 100644 --- a/docs/src/index.js +++ b/docs/src/index.js @@ -80,7 +80,7 @@ function App() {
-
+
diff --git a/docs/src/styles/app.scss b/docs/src/styles/app.scss index c1c5b0c..1f1d33c 100644 --- a/docs/src/styles/app.scss +++ b/docs/src/styles/app.scss @@ -324,3 +324,6 @@ table * { cursor: default; } border-bottom: 1px dotted black; cursor: help; } +.table { + th { border-top: 0 none; } +} diff --git a/src/components/Input.js b/src/components/Input.js index d545ed0..937150f 100644 --- a/src/components/Input.js +++ b/src/components/Input.js @@ -62,6 +62,12 @@ export type InputProps = { */ className?: string, + /** + * Set this to your custom value for `$pretty--class-name`. If you have not changed + * this in `.scss` then _do not modify this prop_. + */ + prettySelector?: string, + /** * Specify a value for the underlying `input` element. */ @@ -186,7 +192,7 @@ function Input(props: InputProps) {
Name Type RequiredDefault Value Description
{key} - {value.flowType.name} + + {value.flowType.name === 'signature' ? value.flowType.type : value.flowType.name} + {value.required.toString()}{value.defaultValue ? value.defaultValue.value : null}