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

Remove redundant Svg requires from components in docs #665

Merged
merged 1 commit into from
Dec 17, 2023
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
1 change: 0 additions & 1 deletion website/docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Options, ThemeConfig } from '@docusaurus/preset-classic'
import type { Config } from '@docusaurus/types'
import { themes as prismThemes } from 'prism-react-renderer'

const config: Config = {
title: 'Reselect',
Expand Down
12 changes: 2 additions & 10 deletions website/src/components/HomepageFeatures/index.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import Heading from '@theme/Heading'
import clsx from 'clsx'
import type { ComponentProps, ComponentType, FC } from 'react'
import type { FC } from 'react'
import { memo } from 'react'
import styles from './styles.module.css'

interface FeatureItem {
title: string
Svg: ComponentType<ComponentProps<'svg'>>
description: JSX.Element
}

const FeatureList: FeatureItem[] = [
{
title: 'Predictable',
Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
description: (
<>
Like Redux, Reselect gives users a <b>consistent mental model</b> for
Expand All @@ -24,7 +22,6 @@ const FeatureList: FeatureItem[] = [
},
{
title: 'Optimized',
Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default,
description: (
<>
Reselect{' '}
Expand All @@ -38,7 +35,6 @@ const FeatureList: FeatureItem[] = [
},
{
title: 'Customizable',
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
description: (
<>
Reselect comes with fast defaults, but provides{' '}
Expand All @@ -49,7 +45,6 @@ const FeatureList: FeatureItem[] = [
},
{
title: 'Type-Safe',
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
description: (
<>
Reselect is designed for <b>great TypeScript support</b>. Generated
Expand All @@ -59,12 +54,9 @@ const FeatureList: FeatureItem[] = [
}
]

const Feature: FC<FeatureItem> = memo(({ title, Svg, description }) => {
const Feature: FC<FeatureItem> = memo(({ title, description }) => {
return (
<div className={clsx('col col--3')}>
<div className="text--center">
{/* <Svg className={styles.featureSvg} role="img" /> */}
</div>
<div className="text--center padding-horiz--md">
<Heading as="h3">{title}</Heading>
<p>{description}</p>
Expand Down
Loading