// with npm
npm install @contco/core-ui
// with yarn
yarn add @contco/core-uiimport { Avatar, Button, Heading, Modal, Image, TextArea } from '@contco/core-ui'-
image: Takes the URL of the image. -
size: Size of the Avatar either small, medium or large (sm, md, lg). -
title: Title of the avatar -
name: Name of the avatar. If there is no image, the avatar would show initials of the name -
color: Color of the initials on the avatar -
active -
width:Custom Avatar Width you want to give in numbers instead of particular size, like (width={40}). -
height:Custom Avatar Height you want to give in numbers instead of particular size, like (height={40}).
<Avatar
title='My Avatar'
name='John Doe'
color='white'
image={imageURL}
active
width={40}
height={40}
/>
<Button color='white' p={2} m={5} bg="black"><Heading mb={4} fontSize='36px' textAlign='justify' color='blue'>
THIS IS A HEADING
</Heading>-
svg: The svg file of any icon -
color: Color of the icon if svg is not present.
<Icon svg={SunIcon} /><Input placeholder='username' p={3} mb={3} /><Box mb={3} p={2} bg='yellow'>
<Input placeholder='Username' />
</Box><Flex mb={3} p={2} bg='yellow'>
<Input placeholder='Username' />
</Flex>-
isOpen: Boolean value for showing the modal on the screen. -
onClose: Evokes a function when the modal is closed.
<Modal isOpen={isClosed} onClose={setIsClosed}>
<>
<Text fontSize={30} fontWeight='bold' textAlign='center'>
Modal Text
</Text>
</>
</Modal><Text fontSize={25} fontWeight='bold' textAlign='center'>
This is a text
</Text><TextArea onChange={setText} height="200px" width="500px"/><Image height="200px" width="500px" src="https://cdn2.thedogapi.com/images/r16sH664Q.gif" alt="Testing Image"/>