|
@@ -1,21 +1,21 @@
|
|
-import classNames from "classnames";
|
|
|
|
-import { useState } from "react";
|
|
|
|
-import Default from "../components/Default";
|
|
|
|
-import OpenSource from "../components/OpenSource";
|
|
|
|
-import SEO from "../components/SEO";
|
|
|
|
-import slug from "../utils/slug";
|
|
|
|
|
|
+import classNames from 'classnames';
|
|
|
|
+import { useState } from 'react';
|
|
|
|
+import Default from '../components/Default';
|
|
|
|
+import OpenSource from '../components/OpenSource';
|
|
|
|
+import SEO from '../components/SEO';
|
|
|
|
+import slug from '../utils/slug';
|
|
|
|
|
|
const pens = [
|
|
const pens = [
|
|
- { title: "Autosave", hash: "RRYBEP" },
|
|
|
|
- { title: "Class vs Inline Style", hash: "jAvpQL" },
|
|
|
|
- { title: "Form Submit", hash: "kXRjQJ" },
|
|
|
|
- { title: "Snow Toolbar Tooltips", hash: "ozYEro" },
|
|
|
|
- { title: "Autogrow Height", hash: "dOqrVm" },
|
|
|
|
- { title: "Custom Fonts", hash: "gLBYam" },
|
|
|
|
- { title: "Quill Playground", hash: "KzZqZx" },
|
|
|
|
|
|
+ { title: 'Autosave', hash: 'RRYBEP' },
|
|
|
|
+ { title: 'Class vs Inline Style', hash: 'jrvpQL' },
|
|
|
|
+ { title: 'Form Submit', hash: 'ZOMjmo' },
|
|
|
|
+ { title: 'Snow Toolbar Tooltips', hash: 'ozYEMo' },
|
|
|
|
+ { title: 'Autogrow Height', hash: 'dOqrVm' },
|
|
|
|
+ { title: 'Custom Fonts', hash: 'gLBYam' },
|
|
|
|
+ { title: 'Quill Playground', hash: 'KzZqZx' },
|
|
].map((pen) => ({ ...pen, slug: slug(pen.title) }));
|
|
].map((pen) => ({ ...pen, slug: slug(pen.title) }));
|
|
|
|
|
|
-const isBrowser = typeof window !== "undefined";
|
|
|
|
|
|
+const isBrowser = typeof window !== 'undefined';
|
|
|
|
|
|
const Playground = () => {
|
|
const Playground = () => {
|
|
const [selectedPen, setSelectedPen] = useState(() => {
|
|
const [selectedPen, setSelectedPen] = useState(() => {
|
|
@@ -41,8 +41,8 @@ const Playground = () => {
|
|
{pens.map((pen, index) => (
|
|
{pens.map((pen, index) => (
|
|
<div
|
|
<div
|
|
key={pen.slug}
|
|
key={pen.slug}
|
|
- className={classNames("four", "columns", {
|
|
|
|
- "selected-pen": selectedPen == index,
|
|
|
|
|
|
+ className={classNames('four', 'columns', {
|
|
|
|
+ 'selected-pen': selectedPen == index,
|
|
})}
|
|
})}
|
|
>
|
|
>
|
|
<a
|
|
<a
|