diff --git a/src/pattern-library/components/PatternPage.js b/src/pattern-library/components/PatternPage.js
deleted file mode 100644
index 3a4f43702..000000000
--- a/src/pattern-library/components/PatternPage.js
+++ /dev/null
@@ -1,137 +0,0 @@
-import { toChildArray } from 'preact';
-
-import { jsxToString } from '../util/jsx-to-string';
-
-/**
- * Components to render patterns and examples. Typical structure of a "Demo"
- * page might be:
- *
- * Everyone loves an elephant.{title}
- {title}
- {children}
-
Example | -Details | -Source | -
---|
- {jsxToString(child)}
-
- + Button components support the following variants: +
++ In addition, a button may be in one of four states, which are + represented in their variant examples, left to right: +
+A button containing an icon and no other content.
- -
- The optional size
property affects the proportions and
- overall size of the button by way of padding. It does not change the
- size of the icon itself, which is sized at
- 1em
. The default sizing is medium
.
-
+ The optional size
property affects the proportions and
+ overall size of the button by way of padding. It does not change the
+ size of the icon itself, which is sized at
+ 1em
. The default sizing is medium
.
+
+ The IconButton
dark variant is for use on darker (light
+ grey vs. white) backgrounds. Note that this button, unlike other{' '}
+ IconButton
s, has a background color. This is to allow
+ for a use case in which the dark IconButton
is
+ initially fixed on a grey background but floats on top of content
+ when scrolled.
+
+ This variant should only be used for non-critical icons on white + backgrounds (low contrast). +
+
- This variant is for use on darker (light grey vs. white) backgrounds.
- Note that this button, unlike other IconButton
s, has a
- background color. This is to allow for a use case in which the dark{' '}
- IconButton
is initially fixed on a grey background but
- floats on top of content when scrolled.
-
- This variant should only be used for non-critical icons on white - backgrounds (low contrast). -
-A button with content and, optionally, an icon.
- -
- As with IconButton
, sizing affects proportions and
- overall size via padding.
-
+ The optional size
property affects the proportions and
+ overall size of the button by way of padding. It does not change the
+ size of the icon itself, which is sized at
+ 1em
. The default sizing is medium
.
+
Intended for use on non-white, very light grey backgrounds.
-A button styled to look like a link (anchor tag).
-For use on light grey (non-white) backgrounds.
+ -
- TextInput
is a basic wrapper around an{' '}
+ The TextInput
component is a basic wrapper around an
input type="text"
field.
This component wraps the text-input-with-button
pattern:
a text input on the left with an associated icon-only button on the
@@ -74,15 +71,17 @@ export default function FormComponents() {
Current usage favors the dark
variant of{' '}
IconButton
.
Spacing units provide a way to apply predefined, consistent spacing dimensions between (margins) and around (padding) elements. Our @@ -106,8 +101,9 @@ export default function LayoutFoundations() { ))} -
Sometimes you may need to apply or adjust horizontal spacing between
an element's immediate children.
@@ -133,8 +129,9 @@ export default function LayoutFoundations() {
Sometimes you may need to apply or adjust vertical spacing between an
element's immediate children.
@@ -156,14 +153,15 @@ export default function LayoutFoundations() {
- The fixed-centered
layout pattern centers an element both
- horizontally and vertically within the entire viewport.
-
+ The fixed-centered
layout pattern centers an element
+ both horizontally and vertically within the entire viewport.
+
- The overlay
layout pattern provides a full-viewport,
- semi-opaque overlay that obscures UI interactions in the viewport
- below. It is intended for use as a backdrop for modals, e.g.
-
+ The overlay
layout pattern provides a full-viewport,
+ semi-opaque overlay that obscures UI interactions in the viewport
+ below. It is intended for use as a backdrop for modals, e.g.
+
- This shows an example of combining the overlay
and{' '}
- fixed-centered
patterns.
-
+ This shows an example of combining the overlay
and{' '}
+ fixed-centered
patterns.
+
onClose
function will cause a close
button to render.
The Thumbnail
component handles rendering a thumbnail or
other image, and provides a loading state and an empty (placeholder)
@@ -23,61 +18,81 @@ export default function ThumbnailComponents() {
250x175px. The Thumbnail will fill, but not exceed, the available
space.
Placeholder can be any JSX
+These examples are within a 100x150px parent.
-