@material-ui/icons#InfoOutlined JavaScript Examples

The following examples show how to use @material-ui/icons#InfoOutlined. 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: Toast.js    From jobtriage with MIT License 6 votes vote down vote up
StatusIcon = ({ type }) => {
  const getIcon = () => {
    if (type === 'success') {
      return <Done fontSize="small" style={{ color: theme.palette.success.main }} />;
    } if (type === 'error') {
      return <Error fontSize="small" style={{ color: theme.palette.error.main }} />;
    }
    return <InfoOutlined fontSize="small" style={{ color: theme.palette.info.main }} />;
  };

  return (
    <IconButton size="small">
      {getIcon()}
    </IconButton>
  );
}
Example #2
Source File: Sidebar.js    From React-discord-clone with MIT License 4 votes vote down vote up
function Sidebar() {

    const user = useSelector(selectUser)
    const [channels, setChannels] = useState([])
    useEffect(() => {
        db.collection('channels').onSnapshot(snapshot => (
          setChannels(snapshot.docs.map(doc => ({
            id: doc.id,
            channel: doc.data(),
          })))
        )
      )
    }, [])

    const handleAddChannel = () => {
      const channelName = prompt("Enter Channel Name");

      if (channelName) {
        db.collection('channels').add({
          channelName
        }) 
      }
    }

    return (
      <div className="sidebar">
        <div className="sidebar__top">
          <h3>CloneServer</h3>
          <ExpandMoreIcon />
        </div>

        <div className="sidebar__channels">
          <div className="sidebar__channelsHeader">
            <div className="sidebar__header">
              <ExpandMoreIcon />
              <h4>Text Channels</h4>
            </div>

            <AddIcon onClick={handleAddChannel} className="sidebar__addChannel" />
          </div>

          <div className="sidebar__channelsLisr">
            
            {channels.map(({id, channel}) => (
              <SidebarChannel key={id} id={id} channelName={channel.channelName}/>
            ))}
            
          </div>
        </div>

        <div className="sidebar__voice">
          <SignalCellularAlt
            className="sidebar__voiceIcon"
            fontSize = "large"
          />
          <div className="sidebar__voiceInfo">
            <h3>Voice Connected</h3>
            <p>Stream</p>
          </div>
          <div className="sidebar__voiceIcon">
            <InfoOutlined />
            <CallIcon />
          </div>
        </div>

        <div className="sidebar__profile">
          <Avatar onClick={() => auth.signOut()} src={user.photo}/>
          <div className="sidebar__profileInfo">
            <h3>{user.displayName}</h3>
            <p>#{user.uid.substring(0,5)}</p>
          </div>

          <div className="sidebar__profileIcons">
            <MicIcon />
            <Headset />
            <SettingsIcon />
          </div>
        </div>
      </div>
    );
}