feat: create separated OS cards component
This commit is contained in:
parent
15aed4d924
commit
d8793c48b1
|
@ -0,0 +1,34 @@
|
|||
import { XStack } from 'tamagui'
|
||||
import { useState } from 'react'
|
||||
|
||||
import OSCard from './OSCard'
|
||||
import { LINUX, WINDOWS } from '../../../../constants'
|
||||
|
||||
const OSCards = () => {
|
||||
const [selectedOs, setSelectedOs] = useState('MAC')
|
||||
|
||||
return (
|
||||
<XStack justifyContent={'space-between'} my={'15px'}>
|
||||
<OSCard
|
||||
icon="/icons/apple-logo.svg"
|
||||
name="MacOS"
|
||||
isSelected={selectedOs === 'MAC'}
|
||||
onClick={() => setSelectedOs('MAC')}
|
||||
/>
|
||||
<OSCard
|
||||
icon="/icons/linux-logo.svg"
|
||||
name={LINUX}
|
||||
isSelected={selectedOs === LINUX}
|
||||
onClick={() => setSelectedOs(LINUX)}
|
||||
/>
|
||||
<OSCard
|
||||
icon="/icons/windows-logo.svg"
|
||||
name={WINDOWS}
|
||||
isSelected={selectedOs === WINDOWS}
|
||||
onClick={() => setSelectedOs(WINDOWS)}
|
||||
/>
|
||||
</XStack>
|
||||
)
|
||||
}
|
||||
|
||||
export default OSCards
|
Loading…
Reference in New Issue