react-icons/bs#BsClock JavaScript Examples

The following examples show how to use react-icons/bs#BsClock. 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: FloatingActionButton.js    From anutimetable with Creative Commons Attribution Share Alike 4.0 International 5 votes vote down vote up
TimeZoneAction = ({ setMenuOpen, setTimeZone, timeZone, darkMode }) => {
  const [timeZoneOpen, setTimeZoneOpen] = useState(false)

  const theme = theme => ({
    ...theme,
    colors: {
      ...theme.colors,
      neutral0: darkMode ? '#101214' : '#fff',
      neutral80: darkMode ? '#fff' : '#000',
      primary25: darkMode ? '#343A40' : '#deebff',
      primary: '#42A5FF',
    }
  })

  return <>
    <FABAction
      className='fab-action'
      title='Change Timezone'
      content={<BsClock size='1.25em' className='m-1' />}
      onClick={() => {
        setTimeZoneOpen(true)
        setMenuOpen(false)
      }}
    />

    <Modal size="xl" centered show={timeZoneOpen} onHide={() => setTimeZoneOpen(false)}>
      <Modal.Header closeButton>
        <Modal.Title>Change the timezone</Modal.Title>
      </Modal.Header>
      <Modal.Body>
        <TimezoneSelect theme={theme} value={timeZone} onChange={tz => setTimeZone(tz.value)} />
      </Modal.Body>
      <Modal.Footer>
        <Button variant="secondary" onClick={() => setTimeZoneOpen(false)}>
          Close
        </Button>
      </Modal.Footer>
    </Modal>
  </>
}