From 1e5a39250f7db25aee35f8c2675d4d118e1b7323 Mon Sep 17 00:00:00 2001 From: winkerVSbecks Date: Thu, 19 Nov 2020 16:36:50 -0500 Subject: [PATCH 1/2] Convert TableOfContents and related components to TS --- ...Link.stories.js => BulletLink.stories.tsx} | 5 +- .../{BulletLink.js => BulletLink.tsx} | 37 +-- src/components/table-of-contents/ItemLink.js | 38 --- ...emLink.stories.js => ItemLink.stories.tsx} | 3 +- src/components/table-of-contents/ItemLink.tsx | 37 +++ ...nuLink.stories.js => MenuLink.stories.tsx} | 3 +- .../{MenuLink.js => MenuLink.tsx} | 8 +- ...stories.js => TableOfContents.stories.tsx} | 105 ++++++--- ...TableOfContents.js => TableOfContents.tsx} | 83 ++++--- .../table-of-contents/TableOfContentsItems.js | 185 --------------- .../TableOfContentsItems.tsx | 222 ++++++++++++++++++ 11 files changed, 420 insertions(+), 306 deletions(-) rename src/components/table-of-contents/{BulletLink.stories.js => BulletLink.stories.tsx} (79%) rename src/components/table-of-contents/{BulletLink.js => BulletLink.tsx} (75%) delete mode 100644 src/components/table-of-contents/ItemLink.js rename src/components/table-of-contents/{ItemLink.stories.js => ItemLink.stories.tsx} (83%) create mode 100644 src/components/table-of-contents/ItemLink.tsx rename src/components/table-of-contents/{MenuLink.stories.js => MenuLink.stories.tsx} (73%) rename src/components/table-of-contents/{MenuLink.js => MenuLink.tsx} (75%) rename src/components/table-of-contents/{TableOfContents.stories.js => TableOfContents.stories.tsx} (57%) rename src/components/table-of-contents/{TableOfContents.js => TableOfContents.tsx} (68%) delete mode 100644 src/components/table-of-contents/TableOfContentsItems.js create mode 100644 src/components/table-of-contents/TableOfContentsItems.tsx diff --git a/src/components/table-of-contents/BulletLink.stories.js b/src/components/table-of-contents/BulletLink.stories.tsx similarity index 79% rename from src/components/table-of-contents/BulletLink.stories.js rename to src/components/table-of-contents/BulletLink.stories.tsx index f7708f4a..6db6e002 100644 --- a/src/components/table-of-contents/BulletLink.stories.js +++ b/src/components/table-of-contents/BulletLink.stories.tsx @@ -1,5 +1,4 @@ -import React, { useState } from 'react'; -import styled from 'styled-components'; +import React from 'react'; import { BulletLink } from './BulletLink'; export default { @@ -10,7 +9,7 @@ export default { const currentPath = '/path-1'; // Bullet links should always be used in a series -export const Series = (args) => ( +export const Series = () => (