fix: delete current docs custom component and story

This commit is contained in:
RadoslavDimchev 2023-10-25 08:50:40 +03:00
parent be0fe93da8
commit ad108eed3b
2 changed files with 0 additions and 67 deletions

View File

@ -1,28 +0,0 @@
import type { Meta, StoryObj } from '@storybook/react'
import { withRouter } from 'storybook-addon-react-router-v6'
import CurrentPlatformOSDocs from './CurrentPlatformOSDocs'
import { MAC } from '../../../../constants'
import { DOCUMENTATIONS } from './documentations'
const meta = {
title: 'ValidatorOnboarding/CurrentPlatformOSDocs',
component: CurrentPlatformOSDocs,
tags: ['autodocs'],
decorators: [withRouter()],
} satisfies Meta<typeof CurrentPlatformOSDocs>
export default meta
type Story = StoryObj<typeof meta>
export const GethGeneral: Story = {
args: {
content: DOCUMENTATIONS['Geth'].general,
},
}
export const GethMacOS: Story = {
args: {
content: DOCUMENTATIONS['Geth'].documentation[MAC],
},
}

View File

@ -1,39 +0,0 @@
import { YStack } from 'tamagui'
import { Link } from 'react-router-dom'
import { Text } from '@status-im/components'
import SyntaxHighlighterBox from './SyntaxHighlighter'
import { DocumentationItem } from './documentations'
type CurrentPlatformOSDocsProps = {
content: DocumentationItem[]
}
const CurrentPlatformOSDocs = ({ content }: CurrentPlatformOSDocsProps) => {
return (
<YStack space={'$2'}>
{content.map((item, index) => {
switch (item.type) {
case 'code':
return <SyntaxHighlighterBox key={index} rows={item.content} />
case 'link':
return (
<Link key={index} to={item.to} target="_blank">
{item.content}
</Link>
)
case 'text':
return (
<Text size={15} key={index}>
{item.content}
</Text>
)
default:
return null
}
})}
</YStack>
)
}
export default CurrentPlatformOSDocs