Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a very simple introductory page to the pattern library #167

Merged
merged 1 commit into from
Aug 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions src/pattern-library/components/LibraryHome.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import Library from './Library';

export default function LibraryHome() {
return (
<Library.Page title="Pattern Library">
<p>
This pattern library demonstrates foundations, patterns and components
that can be used in Hypothesis front-end applications.
</p>

<h2 className="LibraryPage__subheading">Foundations</h2>

<p>
<strong>Foundations</strong> are the core design system elements—colors,
spacing systems, typography—that define the underlying design
fundamentals in Hypothesis UI.
</p>

<p>They exist independently of implementation.</p>

<h2 className="LibraryPage__subheading">Patterns</h2>

<p>
<strong>Patterns</strong> are modular implementations of the design
system <strong>foundations</strong>—from the atomic to the complex.
These implementations are in HTML and CSS.
</p>

<h2 className="LibraryPage__subheading">Components</h2>

<p>
<strong>Components</strong> are{' '}
<a href="https://preactjs.com/">Preact</a> components that are built
using underlying <strong>patterns</strong>.
</p>
</Library.Page>
);
}
8 changes: 0 additions & 8 deletions src/pattern-library/components/PlaygroundHome.js

This file was deleted.

4 changes: 2 additions & 2 deletions src/pattern-library/routes.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import PlaygroundHome from './components/PlaygroundHome';
import LibraryHome from './components/LibraryHome';

import ColorFoundations from './components/patterns/ColorFoundations';
import LayoutFoundations from './components/patterns/LayoutFoundations';
Expand Down Expand Up @@ -34,7 +34,7 @@ const routes = [
{
route: /^\/?$/,
title: 'Home',
component: PlaygroundHome,
component: LibraryHome,
group: 'home',
},
{
Expand Down
5 changes: 5 additions & 0 deletions styles/pattern-library.scss
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,11 @@ $-library-vertical-spacing: 7;
font-size: 1.75em;
font-weight: bold;
}

&__subheading {
font-size: 1.5em;
font-style: italic;
}
Comment on lines +239 to +242
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope we can start in on a typography design system ASAP.

}

.LibraryPattern {
Expand Down