Merge branch 'hn.standard-gauge-component' of https://github.com/status-im/nimbus-gui into hn.standard-gauge-component

This commit is contained in:
Hristo Nedelkov 2023-08-08 10:39:11 +03:00
commit fdcc2d50b7
2 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
import './App.css' import './App.css'
import { TamaguiProvider } from 'tamagui' import { TamaguiProvider } from 'tamagui'
import { Provider as StatusProvider } from '@status-im/components' import { Provider as StatusProvider } from '@status-im/components'
import StandartGauge from './components/StandardGauge' import StandardGauge from './components/StandardGauge'
import config from '../tamagui.config' import config from '../tamagui.config'
@ -26,7 +26,7 @@ function App() {
<TamaguiProvider config={config}> <TamaguiProvider config={config}>
<StatusProvider> <StatusProvider>
<div style={{ height: '500px', width: '300px' }}> <div style={{ height: '500px', width: '300px' }}>
<StandartGauge data={data} /> <StandardGauge data={data} />
</div> </div>
</StatusProvider> </StatusProvider>
</TamaguiProvider> </TamaguiProvider>

View File

@ -6,11 +6,11 @@ interface Data {
value: number value: number
color: string color: string
} }
interface StandartGaugeProps { interface StandardGaugeProps {
data: Data[] data: Data[]
} }
const StandartGauge = ({ data }: StandartGaugeProps) => ( const StandardGauge = ({ data }: StandardGaugeProps) => (
<ResponsivePie <ResponsivePie
data={data} data={data}
margin={{ top: 40, right: 80, bottom: 80, left: 80 }} margin={{ top: 40, right: 80, bottom: 80, left: 80 }}
@ -25,4 +25,4 @@ const StandartGauge = ({ data }: StandartGaugeProps) => (
/> />
) )
export default StandartGauge export default StandardGauge