@material-ui/icons APIs
- ExpandMore
- Delete
- Close
- Visibility
- VisibilityOff
- Check
- Add
- Edit
- Search
- ExpandLess
- Settings
- Person
- Info
- Clear
- ExitToApp
- ArrowDropDown
- Home
- GitHub
- Warning
- ArrowBack
- SearchOutlined
- Done
- LocationOn
- PlayArrow
- Apps
- Brightness4
- Brightness7
- Description
- KeyboardArrowDown
- KeyboardArrowLeft
- KeyboardArrowRight
- MoreVert
- LocationCity
- Map
- Image
- AccountCircle
- InfoOutlined
- Create
- Block
- Replay
- AddCircle
- HomeRounded
- GetApp
- ChevronLeft
- ChevronRight
- CloudDownload
- CheckCircleOutline
- Send
- LockOpen
- Cancel
- NavigateNext
- AccountBox
- DragIndicator
- FavoriteBorderOutlined
- AccessTime
- DoneAll
- CheckCircle
- CropFree
- LockOutlined
- Undo
- Dashboard
- People
- PhotoLibrary
- HomeOutlined
- Group
- ArrowDropUp
- Remove
- ArrowUpward
- Save
- ArrowForward
- AttachFile
- Headset
- SignalCellularAlt
- ArrowForwardIos
- PlayCircleFilled
- AccessAlarm
- Adjust
- BarChart
- CloseRounded
- PlayArrowOutlined
- ImageRounded
- MenuBookRounded
- RefreshRounded
- HourglassEmptyOutlined
- Announcement
- Ballot
- QuestionAnswerOutlined
- CloudUpload
- SkipNext
- ArrowRightAlt
- MoreHoriz
- FileCopy
- MenuBook
- Language
- AlternateEmail
- FolderOpen
- Lock
- Pets
- AddCircleRounded
- ExploreRounded
- WbSunnyRounded
- Brightness2Rounded
- DonutLargeRounded
- AssistantRounded
- AccountCircleRounded
- ExitToAppRounded
- VpnKey
- MailOutline
- Smartphone
- DeleteForever
- LanguageOutlined
- Colorize
- SignalCellularConnectedNoInternet2Bar
- SignalCellularConnectedNoInternet0Bar
- SignalCellular4Bar
- DeleteOutline
- NewReleases
- LocalOffer
- Assessment
- Place
- TrendingDown
- ShoppingCart
- Stop
- RotateLeft
- Menu
- Flag
- Forum
- GroupSharp
- InsertEmoticon
- NotificationsActive
- PhoneIphone
- AllInbox
- Comment
- Photo
- PlaylistAddCheck
- CloudUploadRounded
- ExpandMoreOutlined
- History
- PersonOutlineOutlined
- ArrowForwardIosRounded
- ArrowBackIosRounded
- AssignmentOutlined
- VerticalAlignCenterOutlined
- CalendarTodayOutlined
- Error
- PlaylistPlay
- MusicNoteTwoTone
- Portrait
- ExploreOutlined
- DeleteRounded
- EditRounded
- SaveRounded
- CreateNewFolder
- MeetingRoom
- MenuOpenRounded
- MenuRounded
- DateRange
- CallEnd
- Assignment
- KeyboardBackspace
- BluetoothSearching
- CameraAlt
- PlaylistAdd
- Favorite
- Bluetooth
- OpenInBrowser
- Loop
- FileCopyOutlined
- NavigateBefore
- MergeType
- Dvr
- PersonOutline
- PlayCircleFilledWhiteOutlined
- StoreMallDirectoryOutlined
- SupervisedUserCircleOutlined
- MonetizationOn
- OpenInNew
- ArrowDownward
- AddBox
- FilterList
- FirstPage
- LastPage
- ViewColumn
- Notifications
- DriveEta
- LocalTaxi
- Redo
- AccountTree
- TextFields
- SaveAlt
- ThumbDown
- ThumbUp
- LocalPhone
- VolumeUp
- VolumeDown
- Translate
- AddCircleOutlined
- RemoveCircleOutlined
- Router
- RemoveRedEye
- Chat
- Mood
- Mic
OtherRelated APIs
- react#useState
- react#useEffect
- @material-ui/core/styles#makeStyles
- @material-ui/core#Typography
- @material-ui/core#Button
- @material-ui/core#ListItem
- @material-ui/core#Box
- @material-ui/core#CircularProgress
- @material-ui/core#AppBar
- @material-ui/core#Toolbar
- @material-ui/core#List
- @material-ui/core#ListItemText
- @material-ui/core#ListItemAvatar
- @material-ui/core#Avatar
- @material-ui/core#Grid
- @material-ui/core#Divider
- @material-ui/core#Accordion
- @material-ui/core#AccordionDetails
- @material-ui/core#AccordionSummary
- @material-ui/core#Icon
@material-ui/icons#Pets JavaScript Examples
The following examples show how to use
@material-ui/icons#Pets.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Header.js From Dog-Book with MIT License | 6 votes |
Header = () => {
return (
<AppBar position="static" style={{ backgroundColor: "darkred" }}>
<Toolbar>
<Icon>
<Pets />
</Icon>
<Typography variant="h6" style={{ marginLeft: "1rem" }}>
Dog Book
</Typography>
</Toolbar>
</AppBar>
);
}
Example #2
Source File: List.js From Dog-Book with MIT License | 4 votes |
MyList = (props) => {
const classes = useStyles();
const { breedName, setBreedName, setValue } = props;
const [breeds, setBreeds] = useState(undefined);
const [searchValue, setSearchValue] = useState();
const [expandedPanel, setExpandedPanel] = useState(false);
const handleAccordionChange = (key) => (event, isExpanded) => {
setExpandedPanel(isExpanded ? key : false);
};
const handleChange = (event) => {
let value = event.target.value.toLowerCase();
setSearchValue(value);
};
useEffect(() => {
axios.get("https://dog.ceo/api/breeds/list/all").then((response) => {
console.log(response.data.message);
setBreeds(response.data.message);
});
}, [searchValue]);
return (
<>
<Scroll showBelow={250} />
<Grid container justify="flex-end">
<Grid item xs="12" md="4">
<AutoSearchComplete
searchValue={searchValue}
setSearchValue={setSearchValue}
breeds={breeds}
handleChange={(e) => handleChange(e)}
/>
</Grid>
</Grid>
{breeds ? (
Object.keys(breeds)
.filter((key) =>
searchValue !== "" && searchValue !== undefined
? key === searchValue
: "null"
)
.map((key, i) => {
return (
<Accordion
key={i}
style={{ margin: "1rem" }}
onClick={() => {
setBreedName(key);
}}
expanded={expandedPanel === key}
onChange={handleAccordionChange(key)}
>
<AccordionSummary
expandIcon={<ExpandMoreIcon />}
aria-controls="panel1a-content"
id="key"
>
<Typography
style={{ textTransform: "capitalize" }}
className={
breedName === key
? classes.Accordion_a
: classes.Accordion
}
>
{key}
</Typography>
</AccordionSummary>
<AccordionDetails>
<List>
{breeds[key].length === 0 ? (
<Typography>No Sub-Breads</Typography>
) : (
breeds[key].map((breed) => (
<ListItem>
<ListItemAvatar>
<Avatar>
<Pets />
</Avatar>
</ListItemAvatar>
<ListItemText primary={breed} />
</ListItem>
))
)}
</List>
</AccordionDetails>
<Divider />
<Box p={2}>
<Button
variant="contained"
color="secondary"
onClick={() => setValue(1)}
>
Select
</Button>
</Box>
</Accordion>
);
})
) : (
<Grid
container
direction="row"
justify="center"
alignItems="center"
style={{ height: "60vh" }}
>
<Grid item>
<CircularProgress color="secondary" size="4rem" />
</Grid>
</Grid>
)}
</>
);
}