-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move components to new project structure
- Loading branch information
1 parent
3cb61de
commit f50085e
Showing
23 changed files
with
882 additions
and
882 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React, { HTMLAttributes } from 'react'; | ||
import * as Styles from './styles'; | ||
|
||
interface Props extends HTMLAttributes<HTMLDivElement> { | ||
url: string; | ||
alt: string; | ||
} | ||
|
||
const Avatar = (props: Props) => { | ||
const { url, alt, style } = props; | ||
return <Styles.Image src={url} alt={alt} style={style} />; | ||
}; | ||
|
||
export default Avatar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const Image = styled.img` | ||
border: 1px solid var(--default, hsl(0, 0%, 16%)); | ||
border-radius: 999px; | ||
width: 30px; | ||
height: 30px; | ||
object-fit: cover; | ||
overflow: hidden; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React, { HTMLAttributes } from 'react'; | ||
import { | ||
CheckboxWrapper, | ||
CheckboxLabel, | ||
CheckboxInput, | ||
Checkmark, | ||
} from './styles'; | ||
|
||
interface Props extends HTMLAttributes<HTMLDivElement> { | ||
value: string; | ||
label?: string; | ||
checked?: boolean; | ||
onChange?: () => {}; | ||
error?: string; | ||
disabled?: boolean; | ||
} | ||
|
||
const Checkbox = (props: Props) => { | ||
const { | ||
label, | ||
value, | ||
checked = false, | ||
onChange = () => {}, | ||
error, | ||
disabled = false, | ||
style, | ||
className = '', | ||
} = props; | ||
return ( | ||
<CheckboxWrapper | ||
error={error} | ||
disabled={disabled} | ||
style={style} | ||
className={className} | ||
> | ||
<CheckboxLabel>{label}</CheckboxLabel> | ||
<CheckboxInput | ||
type="checkbox" | ||
name={value} | ||
checked={checked} | ||
onChange={onChange} | ||
disabled={disabled} | ||
/> | ||
<Checkmark /> | ||
</CheckboxWrapper> | ||
); | ||
}; | ||
|
||
export default Checkbox; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react'; | ||
import * as Styles from './styles'; | ||
import { TagColor } from './types'; | ||
|
||
interface TagProps { | ||
color?: TagColor; | ||
value: string; | ||
} | ||
|
||
const Tag = (props: TagProps) => { | ||
const { color = 'primary', value } = props; | ||
return <Styles.TagWrapper color={color}>{value}</Styles.TagWrapper>; | ||
}; | ||
|
||
export default Tag; |
Oops, something went wrong.