-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add: avatar group template structure
- Loading branch information
Showing
3 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
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,30 @@ | ||
const COMPONENT_NAME = 'AvatarGroup'; | ||
|
||
import React from 'react'; | ||
|
||
|
||
import AvatarGroupRoot from './shards/AvatarGroupRoot'; | ||
|
||
// contexts | ||
|
||
// export type AvatarProps = { | ||
// children?: React.ReactNode, | ||
// customRootClass?: string, | ||
// fallback?: string, | ||
// className?: string, | ||
// src?: string, | ||
// alt?: string, | ||
// props?: Record<string, any>[] | ||
// } | ||
|
||
|
||
const AvatarGroup = ({avatars=[], size, customRootClass='', className}) => { | ||
return <AvatarGroupRoot> | ||
|
||
</AvatarGroupRoot>; | ||
}; | ||
|
||
|
||
AvatarGroup.displayName = COMPONENT_NAME; | ||
|
||
export default AvatarGroup; |
5 changes: 5 additions & 0 deletions
5
src/components/ui/AvatarGroup/contexts/AvatarGroupContext.tsx
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,5 @@ | ||
import {createContext} from 'react'; | ||
|
||
const AvatarGroupContext = createContext({}); | ||
|
||
export default AvatarGroupContext; |
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,19 @@ | ||
|
||
import React from 'react'; | ||
|
||
import AvatarGroupContext from './contexts/AvatarGroupContext'; | ||
|
||
|
||
const AvatarGroupRoot = () => { | ||
return ( | ||
<div> | ||
<AvatarGroupContext.Provider value={{}}> | ||
<AvatarGroupRoot > | ||
</AvatarGroupRoot> | ||
</AvatarGroupContext.Provider> | ||
|
||
</div> | ||
); | ||
}; | ||
|
||
export default AvatarGroupRoot; |