From e60d82bf95bd1557f2e4fb0c9ffee210859bf2a8 Mon Sep 17 00:00:00 2001 From: Devin Fee Date: Thu, 13 Jun 2019 14:19:38 -0700 Subject: [PATCH] updated docs for generic's responsive prop [clarification] --- .../simple-props-table/simple-props-table.tsx | 22 ++-- src/base/__docs__/generic.docs.mdx | 114 ++++++++++++------ 2 files changed, 91 insertions(+), 45 deletions(-) diff --git a/src/__docs__/components/simple-props-table/simple-props-table.tsx b/src/__docs__/components/simple-props-table/simple-props-table.tsx index 81a536e0..ef0ea3c5 100644 --- a/src/__docs__/components/simple-props-table/simple-props-table.tsx +++ b/src/__docs__/components/simple-props-table/simple-props-table.tsx @@ -21,23 +21,23 @@ export const SimplePropsTable = ({ props }: SimplePropsTableProps) => { ); const thDescription = hasDescription ? ( - Description + Description ) : ( undefined ); return ( - - - - - - + + + Property + Type + Required + Default {thDescription} - - - + + + {lexSortObj(props).map(({ key: name, value: propDoc }) => ( { propDoc={propDoc} /> ))} - +
PropertyTypeRequiredDefault
); }; diff --git a/src/base/__docs__/generic.docs.mdx b/src/base/__docs__/generic.docs.mdx index c985e698..76e99e3f 100644 --- a/src/base/__docs__/generic.docs.mdx +++ b/src/base/__docs__/generic.docs.mdx @@ -15,7 +15,7 @@ import { } from "src/__docs__/components"; import { Generic } from "../generic"; import { DEFAULTS } from "../helpers/variables"; -import { Notification, Title } from "src/elements"; +import { Notification, Table, Title } from "src/elements"; # Generic @@ -207,35 +207,12 @@ Here is an example of rendering as a `` component, and passing thr ### Responsive properties -## todo: - -the documentation for this prop ought to reflect that these are keys of the `responsive` prop, not props themselves. - | }", }, }} /> @@ -251,28 +228,97 @@ the documentation for this prop ought to reflect that these are keys of the `res { display: { only: "boolean", - value: mapEnumerable(DEFAULTS.displays).replace(/["]/g, "'") + value: mapEnumerable(DEFAULTS.displays).replace(/["]/g, "'"), }, hide: { only: "boolean", - value: "boolean" + value: "boolean", }, textAlign: { only: "boolean", - value: mapEnumerable(DEFAULTS.textAlignments).replace(/["]/g, "'") + value: mapEnumerable(DEFAULTS.textAlignments).replace(/["]/g, "'"), }, textSize: { only: "boolean", - value: mapEnumerable(DEFAULTS.textSizes).replace(/["]/g, "'") - } + value: mapEnumerable(DEFAULTS.textSizes).replace(/["]/g, "'"), + }, }, null, - 2 + 2, ).replace(/["]/g, "")} />
+ + <code>responsive</code> keys + +

+ By default, these are the keys and sizes supplied by Bulma. + You can customize them by overriding variables in the Bulma sass. +

+ + + + key + value type + description + + + + + mobile + LimitedResponsive object + up to 768px + + + + tablet + Responsive object + between769px and 1023px + + + + touch + LimitedResponsive object + up to 1023px (in place of mobile or tablet) + + + + desktop + Responsive object + between1024px and 1215px + + + + widescreen + Responsive object + between1216px and 1407px + + + + fullhd + LimitedResponsive object + 1408px and above + + + +
+ +

+ A simple example of this prop value might look like this: +

+
+
   
     display