Skip to content

Commit

Permalink
add import React on each component
Browse files Browse the repository at this point in the history
  • Loading branch information
leorossi committed Oct 19, 2022
1 parent 9a03fe7 commit 70d14a4
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/components/Api.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import ApiStatus from './Api/Status'
import BorderedBox from './BorderedBox'
import HorizontalSeparator from './HorizontalSeparator'
import styles from './Api.module.css'
import { useState } from 'react'
import React, { useState } from 'react'

function ApiName (props) {
const { name } = props
Expand Down
2 changes: 1 addition & 1 deletion src/components/Api/Endpoints.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict'

import React from 'react'
import BorderedText from '../BorderedText'

export default function Endpoints (props) {
Expand Down
1 change: 1 addition & 0 deletions src/components/Api/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faDatabase, faFileLines, faGear } from '@fortawesome/free-solid-svg-icons'
import BorderedText from '../BorderedText'
import styles from './Footer.module.css'
import React from 'react'
export default function ApiFooter (props) {
const { graphql, openapi } = props
return (
Expand Down
1 change: 1 addition & 0 deletions src/components/Api/Status.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use strict'
import React from 'react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faCircle } from '@fortawesome/free-solid-svg-icons'
export default function ApiStatus (props) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Api/Version.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict'

import React from 'react'
import BorderedText from '../BorderedText'

export default function ApiVersion (props) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/ApiDetail.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import BorderedBox from './BorderedBox'
import BorderedText from './BorderedText'
import HorizontalSeparator from './HorizontalSeparator'
import TwoColumnsLayout from './layouts/TwoColumnsLayout'
import StatsView from './StatView'
import StatsView from './StatsView'
import VerticalSeparator from './VerticalSeparator'

import React from 'react'
export default function ApiDetails (props) {
const apiData = props.data
const { url, repository, version, openapi, graphql, source, lastDeploy } = apiData
Expand Down
1 change: 1 addition & 0 deletions src/components/BorderedBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { getColor } from '../lib/utils'
import styles from './BorderedBox.module.css'
import commonStyles from './Common.module.css'
import React from 'react'
export default function BorderedBox (props) {
const { classes, color, children } = props
const borderColor = getColor('border', color)
Expand Down
2 changes: 1 addition & 1 deletion src/components/BorderedText.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'
import styles from './BorderedText.module.css'

import React from 'react'
export default function BorderedText (props) {
return (
<span className={styles.bordered}>{props.text}</span>
Expand Down
2 changes: 1 addition & 1 deletion src/components/HorizontalSeparator.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict'

import React from 'react'
export default function HorizontalSeparator () {
return <hr className='text-dark-green my-4' />
}
2 changes: 1 addition & 1 deletion src/components/Main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import TabbedWindow from './TabbedWindow'
import Prs from './Pr'
import Playground from './Playground'
import Versions from './Versions'
import { useState } from 'react'
import React, { useState } from 'react'
export default function Main () {
const [currentSearch, setCurrentSearch] = useState('')
const apis = [
Expand Down
2 changes: 1 addition & 1 deletion src/components/Playground.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict'

import React from 'react'
import BorderedBox from './BorderedBox'

export default function Playground () {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Pr.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict'

import React from 'react'
import BorderedBox from './BorderedBox'

export default function Prs () {
Expand Down
2 changes: 1 addition & 1 deletion src/components/SearchBar.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'
import React, { useRef } from 'react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faSearch } from '@fortawesome/free-solid-svg-icons'
import { useRef } from 'react'
import styles from './SearchBar.module.css'
import commonStyles from './Common.module.css'
export default function SearchBar (props) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/StatValue.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict'
import { Fragment } from 'react'
import React from 'react'
import { getColor } from '../lib/utils'
export default function StatValue (props) {
const { value, color, label, pre } = props
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import styles from './StatsView.module.css'
import HorizontalSeparator from './HorizontalSeparator'
import VerticalSeparator from './VerticalSeparator'
import StatValue from './StatValue'

import React from 'react'
export default function StatsView (props) {
const { title, stats } = props
const mainStat = stats.mainStat
Expand Down
2 changes: 1 addition & 1 deletion src/components/Versions.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict'

import React from 'react'
import BorderedBox from './BorderedBox'

export default function Versions () {
Expand Down
2 changes: 1 addition & 1 deletion src/components/VerticalSeparator.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict'

import React from 'react'
export default function VerticalSeparator () {
return <span className='text-dark-green m-3'> | </span>
}
1 change: 1 addition & 0 deletions src/components/layouts/Layout.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use strict'
import React from 'react'

export default function Layout (props) {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/layouts/TwoColumnsLayout.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict'

import React from 'react'
export default function TwoColumnsLayout (props) {
return (
<div className='grid grid-cols-2 gap-x-4'>
Expand Down
5 changes: 5 additions & 0 deletions src/stories/BorderedBox.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ export const Green = Template.bind({})
Green.args = {
color: 'green'
}
export const Red = Template.bind({})

Red.args = {
color: 'red'
}
11 changes: 1 addition & 10 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,5 @@ import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
/** @type {import('vite').UserConfig} */
export default defineConfig({
plugins: [react()],
build: {
rollupOptions: {
output: {
assetFileNames: 'platformatic-ui.css',
chunkFileNames: 'platformatic-ui.js',
manualChunks: undefined
}
}
}
plugins: [react()]
})

0 comments on commit 70d14a4

Please sign in to comment.