This repository has been archived by the owner on Oct 31, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue#10 explore section and upload button list (#12)
* issue#10 explore section and upload button list * issue#10 minor ui changes and passing values as props * minor changes done * issue#13 ui fixes and improvements * Removed margin bottom Co-authored-by: Omkar Prabhu <[email protected]>
- Loading branch information
1 parent
3fced6b
commit a1d96a1
Showing
16 changed files
with
300 additions
and
11 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,38 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { | ||
ImageList, | ||
ImageListImage, | ||
ImageListItem, | ||
ImageListSupporting, | ||
ImageListLabel, | ||
} from '@rmwc/image-list'; | ||
import '@rmwc/image-list/styles'; | ||
|
||
const ExploreEntity = ({ data }) => { | ||
return ( | ||
<> | ||
<ImageList | ||
withTextProtection | ||
style={{ | ||
columnGap: '12px', | ||
}} | ||
> | ||
{data.map((src) => ( | ||
<ImageListItem key={src.image} style={{ marginBottom: '12px' }}> | ||
<ImageListImage src={src.image} style={{ width: '180px' }} /> | ||
<ImageListSupporting> | ||
<ImageListLabel>{src.label}</ImageListLabel> | ||
</ImageListSupporting> | ||
</ImageListItem> | ||
))} | ||
</ImageList> | ||
</> | ||
); | ||
}; | ||
|
||
ExploreEntity.propTypes = { | ||
data: PropTypes.array, | ||
}; | ||
|
||
export default ExploreEntity; |
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,58 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { | ||
ImageList, | ||
ImageListImage, | ||
ImageListItem, | ||
ImageListImageAspectContainer, | ||
} from '@rmwc/image-list'; | ||
import '@rmwc/image-list/styles'; | ||
|
||
const ExploreEntityList = ({ data, type }) => { | ||
const stylePeopleList = { | ||
radius: '50%', | ||
width: '10%', | ||
margin: '0px 6px 6px 6px', | ||
}; | ||
|
||
const stylePlacesThigsList = { | ||
radius: '6px', | ||
width: '13%', | ||
margin: '0px 6px 12px 6px', | ||
}; | ||
|
||
return ( | ||
<> | ||
<ImageList> | ||
{data.map((src) => ( | ||
<ImageListItem | ||
key={src} | ||
style={ | ||
type === 'PeopleList' ? stylePeopleList : stylePlacesThigsList | ||
} | ||
> | ||
<ImageListImageAspectContainer> | ||
<ImageListImage | ||
src={src} | ||
style={{ | ||
borderRadius: | ||
type === 'PeopleList' | ||
? stylePeopleList.radius | ||
: stylePlacesThigsList.radius, | ||
cursor: 'pointer', | ||
}} | ||
/> | ||
</ImageListImageAspectContainer> | ||
</ImageListItem> | ||
))} | ||
</ImageList> | ||
</> | ||
); | ||
}; | ||
|
||
ExploreEntityList.propTypes = { | ||
type: PropTypes.string, | ||
data: PropTypes.array, | ||
}; | ||
|
||
export default ExploreEntityList; |
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import Content from './Content'; | ||
import SideNav from './SideNav'; | ||
import Header from './header/Header'; | ||
import ExploreEntityList from './explore/ExploreEntityList'; | ||
import ExploreEntity from './explore/ExploreEntity'; | ||
|
||
export { Content, SideNav, Header }; | ||
export { Content, SideNav, Header, ExploreEntityList, ExploreEntity }; |
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 |
---|---|---|
@@ -1,7 +1,45 @@ | ||
import React from 'react'; | ||
import { Grid, GridCell } from '@rmwc/grid'; | ||
import { ExploreEntity } from '../../components'; | ||
|
||
const People = () => { | ||
return <>People</>; | ||
const peopleData = [ | ||
{ image: '/avatar.jpg', label: 'People' }, | ||
{ image: '/avatar.jpg', label: 'People' }, | ||
{ image: '/avatar.jpg', label: 'People' }, | ||
{ image: '/avatar.jpg', label: 'People' }, | ||
{ image: '/avatar.jpg', label: 'People' }, | ||
{ image: '/avatar.jpg', label: 'People' }, | ||
{ image: '/avatar.jpg', label: 'People' }, | ||
{ image: '/avatar.jpg', label: 'People' }, | ||
{ image: '/avatar.jpg', label: 'People' }, | ||
{ image: '/avatar.jpg', label: 'People' }, | ||
{ image: '/avatar.jpg', label: 'People' }, | ||
{ image: '/avatar.jpg', label: 'People' }, | ||
{ image: '/avatar.jpg', label: 'People' }, | ||
{ image: '/avatar.jpg', label: 'People' }, | ||
{ image: '/avatar.jpg', label: 'People' }, | ||
{ image: '/avatar.jpg', label: 'People' }, | ||
{ image: '/avatar.jpg', label: 'People' }, | ||
{ image: '/avatar.jpg', label: 'People' }, | ||
{ image: '/avatar.jpg', label: 'People' }, | ||
{ image: '/avatar.jpg', label: 'People' }, | ||
]; | ||
|
||
return ( | ||
<> | ||
<Grid className="grid-cols"> | ||
<GridCell desktop={10} tablet={6} phone={3}> | ||
People | ||
</GridCell> | ||
</Grid> | ||
<Grid> | ||
<GridCell desktop={12} tablet={12} phone={12}> | ||
<ExploreEntity data={peopleData} /> | ||
</GridCell> | ||
</Grid> | ||
</> | ||
); | ||
}; | ||
|
||
export default People; |
Oops, something went wrong.